Documentation
¶
Overview ¶
Package jwriter contains a JSON writer.
Index ¶
- type BufferWriter
- func (w *BufferWriter) Base64Bytes(data []byte) error
- func (w *BufferWriter) Bool(v bool) error
- func (b *BufferWriter) BuildBytes() []byte
- func (w *BufferWriter) Close() error
- func (w *BufferWriter) Flags() Flags
- func (w *BufferWriter) Float32(n float32) error
- func (w *BufferWriter) Float32Str(n float32) error
- func (w *BufferWriter) Float64(n float64) error
- func (w *BufferWriter) Float64Str(n float64) error
- func (b *BufferWriter) Flush() (int, error)
- func (w *BufferWriter) Int(n int) error
- func (w *BufferWriter) Int8(n int8) error
- func (w *BufferWriter) Int8Str(n int8) error
- func (w *BufferWriter) Int16(n int16) error
- func (w *BufferWriter) Int16Str(n int16) error
- func (w *BufferWriter) Int32(n int32) error
- func (w *BufferWriter) Int32Str(n int32) error
- func (w *BufferWriter) Int64(n int64) error
- func (w *BufferWriter) Int64Str(n int64) error
- func (w *BufferWriter) IntStr(n int) error
- func (tw *BufferWriter) MaybeFlush() (int, error)
- func (w *BufferWriter) RawByte(c byte) error
- func (w *BufferWriter) RawBytes(data []byte) error
- func (w *BufferWriter) RawBytesWithErr(data []byte, err error) error
- func (w *BufferWriter) RawString(s string) error
- func (w *BufferWriter) RawTextWithErr(data []byte, err error) error
- func (b *BufferWriter) Size() int
- func (w *BufferWriter) String(s string) error
- func (w *BufferWriter) Uint(n uint) error
- func (w *BufferWriter) Uint8(n uint8) error
- func (w *BufferWriter) Uint8Str(n uint8) error
- func (w *BufferWriter) Uint16(n uint16) error
- func (w *BufferWriter) Uint16Str(n uint16) error
- func (w *BufferWriter) Uint32(n uint32) error
- func (w *BufferWriter) Uint32Str(n uint32) error
- func (w *BufferWriter) Uint64(n uint64) error
- func (w *BufferWriter) Uint64Str(n uint64) error
- func (w *BufferWriter) UintStr(n uint) error
- func (w *BufferWriter) UintptrStr(n uintptr) error
- type Flags
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BufferWriter ¶ added in v0.8.6
type BufferWriter struct {
// contains filtered or unexported fields
}
it is for test
func NewBufferWriter ¶ added in v0.8.6
func NewBufferWriter() *BufferWriter
func (*BufferWriter) Base64Bytes ¶ added in v0.8.6
Base64Bytes appends data to the buffer after base64 encoding it
func (*BufferWriter) BuildBytes ¶ added in v0.8.6
func (b *BufferWriter) BuildBytes() []byte
func (*BufferWriter) Float32Str ¶ added in v0.8.6
func (*BufferWriter) Float64Str ¶ added in v0.8.6
func (*BufferWriter) Flush ¶ added in v0.8.6
func (b *BufferWriter) Flush() (int, error)
func (*BufferWriter) MaybeFlush ¶ added in v0.8.7
func (*BufferWriter) RawBytesWithErr ¶ added in v0.8.6
func (*BufferWriter) RawTextWithErr ¶ added in v0.8.6
func (*BufferWriter) Size ¶ added in v0.8.6
func (b *BufferWriter) Size() int
func (*BufferWriter) UintptrStr ¶ added in v0.8.6
type Flags ¶
type Flags int
Flags describe various encoding options. The behavior may be actually implemented in the encoder, but Flags field in Writer is used to set and pass them around.
type Writer ¶
type Writer interface {
Flags() Flags
MaybeFlush() (int, error)
Flush() (int, error)
// Close resets the buffer.
Close() error
// RawByte appends raw binary data to the buffer.
RawByte(c byte) error
// RawByte appends raw binary data to the buffer.
RawBytes(data []byte) error
RawBytesWithErr(data []byte, err error) error
RawTextWithErr(data []byte, err error) error
// RawByte appends raw binary data to the buffer.
RawString(s string) error
// Base64Bytes appends data to the buffer after base64 encoding it
Base64Bytes(data []byte) error
Uint8(n uint8) error
Uint16(n uint16) error
Uint32(n uint32) error
Uint(n uint) error
Uint64(n uint64) error
Int8(n int8) error
Int16(n int16) error
Int32(n int32) error
Int(n int) error
Int64(n int64) error
Uint8Str(n uint8) error
Uint16Str(n uint16) error
Uint32Str(n uint32) error
UintStr(n uint) error
Uint64Str(n uint64) error
UintptrStr(n uintptr) error
Int8Str(n int8) error
Int16Str(n int16) error
Int32Str(n int32) error
IntStr(n int) error
Int64Str(n int64) error
Float32(n float32) error
Float32Str(n float32) error
Float64(n float64) error
Float64Str(n float64) error
Bool(v bool) error
String(s string) error
}
Click to show internal directories.
Click to hide internal directories.