-
Notifications
You must be signed in to change notification settings - Fork 0
/
json.go
41 lines (29 loc) · 1.1 KB
/
json.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// Package json provides configurable interfaces for JSON encoding and decoding.
package json
import "encoding/json"
var (
// Marshal marshals the given value into a JSON string.
Marshal = json.Marshal
// Unmarshal unmarshals the given JSON string into v.
Unmarshal = json.Unmarshal
// Merge merges two JSON objects into one.
Merge = SimpleMerge
// MarshalIndent marshals the given value into a JSON string with indentation.
MarshalIndent = json.MarshalIndent
// Indent is the indentation used in MarshalIndent.
Indent = json.Indent
// NewEncoder returns a new JSON encoder that writes to w.
NewEncoder = json.NewEncoder
// NewDecoder returns a new JSON decoder that reads from r.
NewDecoder = json.NewDecoder
)
type (
// RawMessage is a raw encoded JSON value.
RawMessage = json.RawMessage
// Marshaler is the interface implemented by types that can marshal JSON.
Marshaler = json.Marshaler
// Unmarshaler is the interface implemented by types that can unmarshal a JSON description of themselves.
Unmarshaler = json.Unmarshaler
// Number represents a JSON number literal.
Number = json.Number
)