Documentation
¶
Overview ¶
Package vjson is a small, minimal alternative to encoding/json which has no dependencies and works with Tingyo. The Marshal and Unmarshal methods work like encoding/json, but structs are not supported, only primitives plus map[string]interface{} and []interface{}.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Marshaler ¶
Marshaler is the interface implemented by types that can marshal themselves into valid JSON.
type Number ¶
type Number string
A Number represents a JSON number literal.
type RawMessage ¶
type RawMessage []byte
RawMessage is a raw encoded JSON value. It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or precompute a JSON encoding.
func (RawMessage) MarshalJSON ¶
func (m RawMessage) MarshalJSON() ([]byte, error)
MarshalJSON returns m as the JSON encoding of m.
func (*RawMessage) UnmarshalJSON ¶
func (m *RawMessage) UnmarshalJSON(data []byte) error
UnmarshalJSON sets *m to a copy of data.
type Token ¶
type Token interface{}
A Token holds a value of one of these types:
Delim, for the four JSON delimiters [ ] { } bool, for JSON booleans float64, for JSON numbers Number, for JSON numbers string, for JSON string literals nil, for JSON null
type Unmarshaler ¶
Unmarshaler is the interface implemented by types that can unmarshal a JSON description of themselves.