FAQ
Consider this code:
http://play.golang.org/p/SPLchMO1SC

To me, this is unexpected behavior. If a JSON object doesn't match an
explicitly-specified field tag, I expect the Unmarshaler to give up; I
don't expect it to "fall back" and try to match based on variable
name.

Thoughts?

———
My concrete problem is described by this code:
http://play.golang.org/p/HFWHTC1MAC

I'm working around it by naming the variables IntegerId and StringId
(or whatever) but it seems wrong.

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 6 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedFeb 19, '13 at 3:15p
activeFeb 19, '13 at 9:21p
posts6
users3
websitegolang.org

3 users in discussion

Peter Bourgon: 3 posts Minux: 2 posts Russ Cox: 1 post

People

Translate

site design / logo © 2022 Grokbase