-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
Milestone
Description
by akunokuroneko:
What steps will reproduce the problem? 1. Create a custom type that implements Unmarshaller against it's immediate (not pointer) value. 2. Use type as an exported immediate value in a struct. 3. json.Decode() and watch the unmarshal fail. What is the expected output? The Unmarshaller method to be invoked. What do you see instead? "json: cannot unmarshal string into Go value of type ..." (in this case, string is the literal type being used in the JSON stream to fudge the custom type) Which compiler are you using (5g, 6g, 8g, gccgo)? 6g Which operating system are you using? Linux amd64 Which revision are you using? (hg identify) r59 Please provide any additional information below. Patch attached.
Attachments:
- json-unmarshal-immediate.diff (799 bytes)