You've already forked json-iterator
mirror of
https://github.com/json-iterator/go.git
synced 2025-06-15 22:50:24 +02:00
array encoder
This commit is contained in:
10
stream.go
10
stream.go
@ -171,6 +171,11 @@ func (stream *Stream) WriteObjectEnd() {
|
||||
stream.writeByte('}')
|
||||
}
|
||||
|
||||
func (stream *Stream) WriteEmptyObject() {
|
||||
stream.writeByte('{')
|
||||
stream.writeByte('}')
|
||||
}
|
||||
|
||||
func (stream *Stream) WriteMore() {
|
||||
stream.writeByte(',')
|
||||
stream.writeIndention(0)
|
||||
@ -182,6 +187,11 @@ func (stream *Stream) WriteArrayStart() {
|
||||
stream.writeIndention(0)
|
||||
}
|
||||
|
||||
func (stream *Stream) WriteEmptyArray() {
|
||||
stream.writeByte('[')
|
||||
stream.writeByte(']')
|
||||
}
|
||||
|
||||
func (stream *Stream) WriteArrayEnd() {
|
||||
stream.writeIndention(stream.IndentionStep)
|
||||
stream.indention -= stream.IndentionStep
|
||||
|
Reference in New Issue
Block a user