json

package
v0.0.0-...-4e1d4fc Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2021 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONInterface

type JSONInterface interface {
	Marshal(v interface{}) ([]byte, error)
	Unmarshal(data []byte, v interface{}) error
}

JSONInterface represents an interface to handle json data

var (
	// DefaultJSONHandler default json handler
	DefaultJSONHandler JSONInterface = StdJSON{}
)

type StdJSON

type StdJSON struct{}

StdJSON implements JSONInterface via encoding/json

func (StdJSON) Marshal

func (StdJSON) Marshal(v interface{}) ([]byte, error)

Marshal implements JSONInterface

func (StdJSON) Unmarshal

func (StdJSON) Unmarshal(data []byte, v interface{}) error

Unmarshal implements JSONInterface

Jump to

Keyboard shortcuts

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