text: import "encoding/json"
  Package json implements encoding and decoding of JSON as defined in RFC 4627. The mapping between JSON and Go values is described in the documentation for the Marshal and Unmarshal functions.
  See "JSON and Go" for an introduction to this package:
  Code:
  package json Example_customMarshalJSON() {]) // Output: // Zoo Census: // * Gophers: 3 // * Zebras: 2 // * Unknown: 3 }
  Output:
  Zoo Census: * Gophers: 3 * Zebras: 2 * Unknown: 3
  func Compact(dst *bytes.Buffer, src []byte) error
  Compact appends to dst the JSON-encoded src with insignificant space characters elided.
  func HTMLEscape(dst *bytes.Buffer, src []byte).
  func Indent(dst *bytes.Buffer, src []byte, prefix, indent string) error.(v interface{}) ([]byte, error)..:
  - string keys infinite recursion..
  Code:
  data := map[string]int{ "a": 1, "b": 2, } json, err := json.MarshalIndent(data, "<prefix>", "<indent>") if err != nil { log.Fatal(err) } fmt.Println(string(json))
  Output:
  { <prefix><indent>"a": 1, <prefix><indent>"b": 2 <prefix>}
  func Unmarshal(data []byte, v interface{}) error. Unmarshal will only set exported fields of the struct..
  Code:)
  Output:
  [{Name:Platypus Order:Monotremata} {Name:Quoll Order:Dasyuromorphia}]
  func Valid(data []byte) bool
  Valid reports whether data is a valid JSON encoding.
  type Decoder struct { // contains filtered or unexported fields }
  A Decoder reads and decodes JSON values from an input stream.
  This example uses a Decoder to decode a stream of distinct JSON values.
  Code:) }
  Output:.
  Code:)
  Output:
  json.Delim: [ Ed: Knock knock. Sam: Who's there? Ed: Go fmt. Sam: Go fmt who? Ed: Go fmt yourself! json.Delim: ]
  func (dec *Decoder) More() bool
  More reports whether there is another element in the current array or object being parsed.
  func (dec *Decoder) Token() (Token, error).
  This example uses a Decoder to decode a stream of distinct JSON values.
  Code:") }
  Output:.
  type Delim rune
  A Delim is a JSON array or object delimiter, one of [ ] { or }.
  func (d Delim) String() string
  type Encoder struct { // contains filtered or unexported fields }
  An Encoder writes JSON values to an output stream. struct { S string // the whole string value that caused the error }
  Before.
  func  types value. It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or precompute a JSON encoding.
  This example uses RawMessage to use a precomputed JSON during marshal..
  Code:) }
  Output: struct { Key string Type reflect.Type Field reflect.StructField }
  An UnmarshalFieldError describes a JSON object key that led to an unexported (and therefore unwritable) struct field.
  Deprecated: Struct string // name of the struct type containing the field Field string // name of the field holding the Go value }
  An UnmarshalTypeError describes a JSON value that was not appropriate for a value of a specific Go type.
  func (e *UnmarshalTypeError) Error() string
  type Unmarshaler interface { UnmarshalJSON([]byte).
  type UnsupportedTypeError struct { Type reflect.Type }
  An UnsupportedTypeError is returned by Marshal when attempting to encode an unsupported value type.
  func (e *UnsupportedTypeError) Error() string
  type UnsupportedValueError struct { Value reflect.Value Str string }
  func (e *UnsupportedValueError) Error() string