We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
package main import ( "encoding/json" "log" "reflect" "github.com/json-iterator/go" ) func test(s string) { var err1, err2 error var v1, v2 interface{} log.Printf("testing: %q", s) err1 = jsoniter.Unmarshal([]byte(s), &v1) err2 = json.Unmarshal([]byte(s), &v2) if err1 != nil && err2 == nil { log.Printf("jsoniter return error but encoding/json not return error: %v", err1) } else if err1 == nil && err2 != nil { log.Printf("jsoniter not return error but encoding/json return error: %v", err2) } else if err1 == nil && err2 == nil && !reflect.DeepEqual(v1, v2) { log.Printf("there are different between jsoniter and encoding/json: %v, %v", v1, v2) } } func main() { test(`"\uD83D"`) test(`"\U0001f64f"`) test(`"\uDEADBEEF"`) }
reference: gin-gonic/gin#1026
The text was updated successfully, but these errors were encountered:
#137 fix unicode surrogate incompatibility
156284b
fixed
Sorry, something went wrong.
acknowledge @mattn for #138 #137 #136 #135
60ba332
json-iterator#137 fix unicode surrogate incompatibility
dcc0b2f
acknowledge @mattn for json-iterator#138 json-iterator#137 json-itera…
232ff4c
…tor#136 json-iterator#135
No branches or pull requests
reference: gin-gonic/gin#1026
The text was updated successfully, but these errors were encountered: