You've already forked json-iterator
mirror of
https://github.com/json-iterator/go.git
synced 2025-06-30 23:23:49 +02:00
expose OptionalEncoder&OptionalDecoder; add attachment to Stream&Iterator for customized decoder/encoder
This commit is contained in:
@ -4,15 +4,16 @@ import (
|
||||
"io"
|
||||
)
|
||||
|
||||
// Stream is a io.Writer like object, with JSON specific write functions.
|
||||
// stream is a io.Writer like object, with JSON specific write functions.
|
||||
// Error is not returned as return value, but stored as Error member on this stream instance.
|
||||
type Stream struct {
|
||||
cfg *frozenConfig
|
||||
out io.Writer
|
||||
buf []byte
|
||||
n int
|
||||
Error error
|
||||
indention int
|
||||
cfg *frozenConfig
|
||||
out io.Writer
|
||||
buf []byte
|
||||
n int
|
||||
Error error
|
||||
indention int
|
||||
Attachment interface{} // open for customized encoder
|
||||
}
|
||||
|
||||
// NewStream create new stream instance.
|
||||
|
Reference in New Issue
Block a user