GoJSON

Syntax

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

Remarks

The package "encoding/json" Package json implements encoding and decoding of JSON objects in Go.


Types in JSON along with their corresponding concrete types in Go are:

JSON TypeGo Concrete Type
booleanbool
numbersfloat64 or int
stringstring
nullnil

Related Examples

Basic JSON decoding