Documentation ¶
Overview ¶
Package json implements the JSON format for Emitter.
Index ¶
- type Appender
- type BytesAppender
- type Format
- type Generator
- func (g *Generator) Begin() []Appender
- func (g *Generator) BigFloatValue(value *big.Float) []Appender
- func (g *Generator) BigIntValue(value *big.Int) []Appender
- func (g *Generator) BoolValue(value bool) []Appender
- func (g *Generator) ByteValue(value byte) []Appender
- func (g *Generator) BytesValue(value []byte) []Appender
- func (g *Generator) End() []Appender
- func (g *Generator) EndArray() []Appender
- func (g *Generator) EndObject() []Appender
- func (g *Generator) Factory() emitter.GeneratorFactory
- func (g *Generator) FloatValue(value float64) []Appender
- func (g *Generator) InfValue(isNeg bool) []Appender
- func (g *Generator) IntValue(value int64) []Appender
- func (g *Generator) Key(key string) []Appender
- func (g *Generator) NaNValue() []Appender
- func (g *Generator) NullValue() []Appender
- func (g *Generator) Reset()
- func (g *Generator) RuneValue(value rune) []Appender
- func (g *Generator) StartArray() []Appender
- func (g *Generator) StartObject() []Appender
- func (g *Generator) StringValue(value string) []Appender
- func (g *Generator) UintValue(value uint64) []Appender
- type JSON
- type StringAppender
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BytesAppender ¶
type BytesAppender struct {
Value []byte
}
func (BytesAppender) Append ¶
func (a BytesAppender) Append(out []byte) []byte
func (BytesAppender) String ¶
func (a BytesAppender) String() string
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
func (*Generator) BytesValue ¶
func (*Generator) FloatValue ¶
func (*Generator) StartArray ¶
func (*Generator) StartObject ¶
func (*Generator) StringValue ¶
type JSON ¶
type JSON struct { Format Format IndentSize uint IndentWithTabs bool EscapeHTML bool TraceEnabled bool }
func (JSON) NewGenerator ¶
func (json JSON) NewGenerator() emitter.Generator
type StringAppender ¶
func (StringAppender) Append ¶
func (a StringAppender) Append(out []byte) []byte
func (StringAppender) String ¶
func (a StringAppender) String() string
Click to show internal directories.
Click to hide internal directories.