Open kz-sher opened 1 year ago
@taowen
split it into two functions, duplicate the code is ok
done
this will affect all users of writeStringSlowPath. do not want to make such a impactful change.
@taowen This is the same with https://go.dev/src/encoding/json/encode.go#L1029. The code changes essentially restrict contents to be UTF-8. According to https://github.com/golang/go/issues/36686#issuecomment-576963338, I think the users should have accepted this behavior. If they opt for another encodings, they should follow JSON convention by doing transformation in advance.
they can opt to use the standard library
@taowen I think jsoniter is created to be one of the better alternatives of official JSON pkg. Should you be considering this feature to be added in another ways such as having Config.MarshalByteWithUTF8Coerced
option? It seems like its Java version has this support.
you may add my wechat "nctaowen"
See #663