Documentation
¶
Overview ¶
Package typedjson allows encoding and decoding shell syntax trees as JSON. The decoding process needs to know what syntax node types to decode into, so the "typed JSON" requires "Type" keys in some syntax tree node objects:
- The root node
- Any node represented as an interface field in the parent Go type
The types of all other nodes can be inferred from context alone.
For the sake of efficiency and simplicity, the "Type" key described above must be first in each JSON object.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decode ¶
Decode is a shortcut for DecodeOptions.Decode with the default options.
Types ¶
type DecodeOptions ¶
type DecodeOptions struct { }
DecodeOptions allows configuring how syntax nodes are encoded.
type EncodeOptions ¶
type EncodeOptions struct {
Indent string // e.g. "\t"
}
EncodeOptions allows configuring how syntax nodes are encoded.
Click to show internal directories.
Click to hide internal directories.