|
|
@@ -2,6 +2,7 @@ package jsoniter
|
|
|
|
|
|
import (
|
|
|
"unicode/utf16"
|
|
|
+ "fmt"
|
|
|
)
|
|
|
|
|
|
// ReadString read string from iterator
|
|
|
@@ -16,6 +17,10 @@ func (iter *Iterator) ReadString() (ret string) {
|
|
|
return ret
|
|
|
} else if c == '\\' {
|
|
|
break
|
|
|
+ } else if c < ' ' {
|
|
|
+ iter.ReportError("ReadString",
|
|
|
+ fmt.Sprintf(`invalid control character found: %d`, c))
|
|
|
+ return
|
|
|
}
|
|
|
}
|
|
|
return iter.readStringSlowPath()
|