Open Arrow-Li opened 1 year ago
According to the source code, all unsafe UTF-8 character will be hexed.
You can try with:
a := "{\"F\":\"{\\\\x22abc\\\\x22:\\\\x22123\\\\x22}\"}"
However, I think this extension could be just an example (my POV: it is not very production-ready)
Version:github.com/json-iterator/go v1.1.12
A json like below be panic when unmarshal with BinaryAsStringExtension
Test Code
import ( j "github.com/json-iterator/go" je "github.com/json-iterator/go/extra" )
type D struct { F []byte
json:"F"
}func main() { a := "{\"F\":\"{\\"abc\\":\\"123\\"}\"}"
}