Documentation
¶
Overview ¶
Package json converts JSON to and from CUE.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decode ¶ added in v0.0.12
Decode converts a JSON file to a CUE value.
If src != nil, Extract parses the source from src and the path is for position information. The type of the argument for the src parameter must be string, []byte, or io.Reader. If src == nil, ParseFile parses the file specified by filename.
func Extract ¶ added in v0.0.12
Extract parses the JSON to a CUE expression.
If src != nil, Extract parses the source from src and the path is for position information. The type of the argument for the src parameter must be string, []byte, or io.Reader. If src == nil, ParseFile parses the file specified by filename.
Types ¶
type Decoder ¶ added in v0.0.12
type Decoder struct {
// contains filtered or unexported fields
}
A Decoder converts JSON values to CUE.
func NewDecoder ¶ added in v0.0.12
NewDecoder configures a JSON decoder. The path is used to associate position information with each node. The runtime may be nil if the decoder is only used to extract to CUE ast objects.