json

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2026 License: Apache-2.0 Imports: 4 Imported by: 3

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.

func NewParser added in v0.2.0

func NewParser() Parser

NewParser returns a new JSON parser with indexes. Use this parser with other Katydid tools, such as the validator.

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL