1
0
mirror of https://github.com/json-iterator/go.git synced 2025-06-15 22:50:24 +02:00

#63 keep struct field order

This commit is contained in:
Tao Wen
2017-06-23 08:21:02 +08:00
parent d7ea1acd3f
commit 8f8e16b4c2
6 changed files with 72 additions and 47 deletions

View File

@ -252,7 +252,7 @@ func (stream *Stream) WriteStringWithHtmlEscaped(s string) {
func writeStringSlowPathWithHtmlEscaped(stream *Stream, i int, s string, valLen int) {
start := i
// for the remaining parts, we process them char by char
for ; i < valLen; {
for i < valLen {
if b := s[i]; b < utf8.RuneSelf {
if htmlSafeSet[b] {
i++
@ -351,7 +351,7 @@ func (stream *Stream) WriteString(s string) {
func writeStringSlowPath(stream *Stream, i int, s string, valLen int) {
start := i
// for the remaining parts, we process them char by char
for ; i < valLen; {
for i < valLen {
if b := s[i]; b < utf8.RuneSelf {
if safeSet[b] {
i++