Documentation ¶
Index ¶
- func Fprint(w io.Writer, v interface{}) error
- func Marshal(v interface{}) ([]byte, error)
- func Print(v interface{}) error
- func ReadFile(file string, v interface{}) error
- func ReadFileMaybeJSON(file string, v interface{}) error
- func Sprint(v interface{}) (string, error)
- func ToJSON(input []byte) ([]byte, []*lexing.Error)
- func Unmarshal(bs []byte, v interface{}) error
- func WriteFile(p string, v interface{}) error
- type Decoder
- type TypeMaker
- type Typed
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadFileMaybeJSON ¶
ReadFileMaybeJSON reads a file that might be JSONx or JSON.
Types ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
Decoder is a decoder that is capable of parsing a stream.
func NewDecoder ¶
NewDecoder creates a new decoder that can parse a stream of jsonx objects.
func NewFileDecoder ¶
NewFileDecoder creates a new decoder that can parse a stream of jsonx objects, where name is the filename.
func (*Decoder) Decode ¶
Decode decodes a JSON value from the parser. When there is error on parsing JSONx, v is always unchanged.
func (*Decoder) DecodeSeries ¶
DecodeSeries decode a typed series. It uses strict JSON decoding.
Click to show internal directories.
Click to hide internal directories.