Documentation
¶
Overview ¶
Package json contains the implementation of a JSON parser.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Parser ¶ added in v0.5.0
type Parser interface {
goparse.Parser
Reset()
// Init restarts the parser with a new byte buffer, without allocating a new parser.
Init([]byte)
}
func NewJSONSchemaParser ¶ added in v0.5.0
func NewJSONSchemaParser() Parser
NewJSONSchemaParser returns a new JSON parser that tags objects and arrays, so that the types can be checked by JSONSchema. The following json: `{"a": ["b", "c"]}` is parsed as: `{"object": {"a": {"array": {0: "b", 1: "c"}}}}`. The kind returned from the Token method for "object" and "array" will be parse.TagKind.
Directories
¶
| Path | Synopsis |
|---|---|
|
internal
|
|
|
fork/jsontext
jsontext is a package of tests that were originally copied from https://github.com/go-json-experiment/json/blob/master/jsontext/decode_test.go
|
jsontext is a package of tests that were originally copied from https://github.com/go-json-experiment/json/blob/master/jsontext/decode_test.go |
|
fork/strconv
strconv was originally copied from the Go standard library's strconv package, but with several modifications.
|
strconv was originally copied from the Go standard library's strconv package, but with several modifications. |
|
fork/unquote
unquote is a package that is a copy of unquoteBytes from https://golang.org/src/encoding/json/decode.go
|
unquote is a package that is a copy of unquoteBytes from https://golang.org/src/encoding/json/decode.go |
Click to show internal directories.
Click to hide internal directories.