1
0
mirror of https://github.com/json-iterator/go.git synced 2025-03-26 21:12:40 +02:00

Used writeTwoBytes in Stream.WriteEmptyArray

This commit is contained in:
MOZGIII 2017-10-03 22:14:36 +03:00 committed by GitHub
parent abe3c4016b
commit 14b28b2226

View File

@ -283,8 +283,7 @@ func (stream *Stream) WriteArrayStart() {
// WriteEmptyArray write []
func (stream *Stream) WriteEmptyArray() {
stream.writeByte('[')
stream.writeByte(']')
stream.writeTwoBytes('[', ']')
}
// WriteArrayEnd write ] with possible indention