Documentation
¶
Overview ¶
Package reflect contains an implementation of a parser for a reflected go structure.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Parser ¶ added in v0.3.0
type Parser interface {
goparse.Parser
//Init initialises the parser with a value of reflected go structure.
Init(value reflect.Value)
Reset()
}
Parser is a parser for a reflected go structure.
func NewJSONSchemaParser ¶ added in v0.3.0
func NewJSONSchemaParser() Parser
NewJSONSchemaParser returns a new reflect 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.
Click to show internal directories.
Click to hide internal directories.