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
If you try to unmarshal a JSON string with entries with identical keys but different cases, the correct key may not be chosen.
Test Program:
package main import ( "encoding/json" "fmt" ) type testStruct struct { Testone string `json:"testone"` } func main() { testStr := ` { "testone": "one", "testOne": "two" }` var s testStruct json.Unmarshal([]byte(testStr), &s) fmt.Printf("testone = %s\n", s.Testone) }
Expected output: testone = one Actual output: testone = two
testone = one
testone = two
Tested on Go Playground - go1.11.1
https://play.golang.org/p/zMeyW9Zgfnz
The text was updated successfully, but these errors were encountered:
Dup of #14750?
Sorry, something went wrong.
Looks like it, closing this issue.
No branches or pull requests
If you try to unmarshal a JSON string with entries with identical keys but different cases, the correct key may not be chosen.
Test Program:
Expected output:
testone = one
Actual output:
testone = two
Tested on Go Playground - go1.11.1
https://play.golang.org/p/zMeyW9Zgfnz
The text was updated successfully, but these errors were encountered: