encoding

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2021 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Overview

Package encoding provides Decoding implementations.

Index

Constants

View Source
const JSON = "json"
View Source
const NOOP = "no-op"
View Source
const SAFE_JSON = "safejson"
View Source
const STRING = "string"

Variables

This section is empty.

Functions

func JSONCollectionDecoder

func JSONCollectionDecoder(r io.Reader, v *map[string]interface{}) error

func JSONDecoder

func JSONDecoder(r io.Reader, v *map[string]interface{}) error

func NewJSONDecoder

func NewJSONDecoder(isCollection bool) func(io.Reader, *map[string]interface{}) error

func NewSafeJSONDecoder

func NewSafeJSONDecoder(isCollection bool) func(io.Reader, *map[string]interface{}) error

func NewStringDecoder

func NewStringDecoder(_ bool) func(io.Reader, *map[string]interface{}) error

func NoOpDecoder

func NoOpDecoder(_ io.Reader, _ *map[string]interface{}) error

func SafeJSONDecoder

func SafeJSONDecoder(r io.Reader, v *map[string]interface{}) error

func StringDecoder

func StringDecoder(r io.Reader, v *map[string]interface{}) error

Types

type Decoder

type Decoder func(io.Reader, *map[string]interface{}) error

type DecoderFactory

type DecoderFactory func(bool) func(io.Reader, *map[string]interface{}) error

type DecoderRegister

type DecoderRegister struct {
	// contains filtered or unexported fields
}

func GetRegister

func GetRegister() *DecoderRegister

func (*DecoderRegister) Get

func (r *DecoderRegister) Get(name string) func(bool) func(io.Reader, *map[string]interface{}) error

func (*DecoderRegister) Register

func (r *DecoderRegister) Register(name string, dec func(bool) func(io.Reader, *map[string]interface{}) error) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL