Closed kitsuniru closed 2 years ago
why don't use them?
While jsoniter may be a little faster than encoding/json, I've been meaning to remove the encoding/json dependency altogether. I was only using it for encoding json strings that had unicode or needed escape characters.
I pushed an update moments ago that replace the need for the encoding/json, and adds a new function AppendJSONString
which converts a string to json and appends it to a byte slice, and it’s a little faster than both "encoding/json" and "jsoniter".
https://gist.github.com/tidwall/4bba4ee9473f810371046b8564d45e9d
Oops, seems like i didn't notice that commit, sorry ^_^ Glad to see dependency-free solution from you, thanks!
Jsoniter algorithms better with marshalling and unmarshalling, so, why don't use them?