Documentation
¶
Overview ¶
Package json contains logic for writing JSON.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Writer ¶
type Writer interface {
BeginObject()
BeginObjectField(name string)
BeginObjectBytesField(name []byte)
EndObject()
BeginArray()
EndArray()
WriteBool(b bool)
WriteNull()
WriteFloat64(n float64)
WriteInt(n int)
WriteString(s string)
WriteBytesString(s []byte)
Flush() error
Close() error
}
A Writer can be used to directly stream JSON results without going through an intermediate object layer.
func NewNoopWriter ¶ added in v1.2.0
func NewNoopWriter() Writer
NewNoopWriter creates a JSON writer that does nothing.
Click to show internal directories.
Click to hide internal directories.