Documentation ¶
Index ¶
- Constants
- func Load(path string, v interface{}) error
- func Marshal(v interface{}) ([]byte, error)
- func MarshalIndent(v interface{}, prefix, indent string) ([]byte, error)
- func MarshalJSON(v interface{}) ([]byte, error)
- func NewDecoder(rd io.Reader) encoding.Decoder
- func NewEncoder(out io.Writer) encoding.Encoder
- func Save(path string, v interface{}) error
- type EncoderOption
Constants ¶
View Source
const ( TokenColon TokenType = "':'" TokenComma TokenType = "','" TokenLBrace TokenType = "'{'" TokenRBrace TokenType = "'}'" TokenLSquare TokenType = "'['" TokenRSquare TokenType = "']'" TokenPlus TokenType = "'+'" TokenMinus TokenType = "'-'" )
Variables ¶
This section is empty.
Functions ¶
func Load ¶
Load is a convenience function to load a JSON5 document into the value pointed at by v. It is functionally equivalent to NewDecoder(<file at path>).Decode(v).
func MarshalIndent ¶
func MarshalJSON ¶
Types ¶
type EncoderOption ¶
type EncoderOption func(*encoder)
func JSON ¶
func JSON() EncoderOption
func Prefix ¶
func Prefix(prefix string) EncoderOption
Click to show internal directories.
Click to hide internal directories.