FAQ
Reviewers: golang-dev_googlegroups.com,

Message:
Hello golang-dev@googlegroups.com,

I'd like you to review this change to
https://code.google.com/p/go/


Description:
encoding/json: document case-insensitive Unmarshal key matching

Fixes issue 4664.

Please review this at https://codereview.appspot.com/7237060/

Affected files:
M src/pkg/encoding/json/decode.go


Index: src/pkg/encoding/json/decode.go
===================================================================
--- a/src/pkg/encoding/json/decode.go
+++ b/src/pkg/encoding/json/decode.go
@@ -33,6 +33,10 @@
// the value pointed at by the pointer. If the pointer is nil, Unmarshal
// allocates a new value for it to point to.
//
+// To unmarshal JSON into a struct, Unmarshal matches incoming object
+// keys to the keys used by Marshal (either the struct field name or its
tag),
+// preferring an exact match but also accepting a case-insensitive match.
+//
// To unmarshal JSON into an interface value, Unmarshal unmarshals
// the JSON into the concrete value contained in the interface value.
// If the interface value is nil, that is, has no concrete value stored in
it,


--

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

Search Discussions

  • Adg at Jan 31, 2013 at 7:08 am
    LGTM

    https://codereview.appspot.com/7237060/

    --

    ---
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Rsc at Jan 31, 2013 at 3:49 pm
    *** Submitted as
    https://code.google.com/p/go/source/detail?r=31c77e1e8711 ***

    encoding/json: document case-insensitive Unmarshal key matching

    Fixes issue 4664.

    R=golang-dev, adg
    CC=golang-dev
    https://codereview.appspot.com/7237060


    https://codereview.appspot.com/7237060/

    --

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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedJan 31, '13 at 7:07a
activeJan 31, '13 at 3:49p
posts3
users2
websitegolang.org

2 users in discussion

Rsc: 2 posts Adg: 1 post

People

Translate

site design / logo © 2022 Grokbase