You've already forked json-iterator
mirror of
https://github.com/json-iterator/go.git
synced 2025-07-15 23:54:21 +02:00
#75 support MarshalIndent
This commit is contained in:
@ -225,7 +225,11 @@ func (stream *Stream) WriteObjectStart() {
|
||||
|
||||
func (stream *Stream) WriteObjectField(field string) {
|
||||
stream.WriteString(field)
|
||||
stream.writeByte(':')
|
||||
if stream.indention > 0 {
|
||||
stream.writeTwoBytes(':', ' ')
|
||||
} else {
|
||||
stream.writeByte(':')
|
||||
}
|
||||
}
|
||||
|
||||
func (stream *Stream) WriteObjectEnd() {
|
||||
|
Reference in New Issue
Block a user