Skip to content

Commit 0d1d90c

Browse files
author
Tao Wen
committed
write string
1 parent 573ec6b commit 0d1d90c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

stream_interface.go

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ package jsoniter
22

33
func (stream *Stream) WriteInterface(val interface{}) bool {
44
switch x := val.(type) {
5+
case string:
6+
stream.WriteString(x)
7+
return true
58
case bool:
69
stream.WriteBool(x)
710
return true

0 commit comments

Comments
 (0)