JSON

Download go eBook

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

Stats

321 Contributors: 12
Monday, September 12, 2016
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial: info@zzzprojects.com

Download eBook