-
Notifications
You must be signed in to change notification settings - Fork 17.5k
New issue
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
encoding/json: make Number with the ,string option marshal with quotes #34269
Conversation
Add quotes if a value of type json.Number with the string option (struct tag) set is marshaled. This ensures, that the resulting json can be unmarshaled into the source struct without error. Fixes golang#34268
This PR (HEAD: dde81b7) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/ /195043 to see it. Tip: You can toggle comments from me using the |
Message from Daniel Martí: Patch Set 1: Run-TryBot 1 (4 comments) The roundtrip argument makes sense, and the fix looks good. Just some minor thoughts. Please don’t reply on this GitHub thread. Visit golang.org/cl/195043. |
Message from Gobot Gobot: Patch Set 1: TryBots beginning. Status page: https://farmer.golang.org/try?commit=d49134af Please don’t reply on this GitHub thread. Visit golang.org/cl/195043. |
Message from Gobot Gobot: Patch Set 1: TryBot-Result 1 TryBots are happy. Please don’t reply on this GitHub thread. Visit golang.org/cl/195043. |
Message from Lucas Bremgartner: Patch Set 3: (4 comments) Thanks Daniel for the review, I changed the commit message according to your suggestions. Please don’t reply on this GitHub thread. Visit golang.org/cl/195043. |
Message from Daniel Martí: Patch Set 3: Run-TryBot 1 Code-Review 2 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/195043. |
Message from Gobot Gobot: Patch Set 3: TryBots beginning. Status page: https://farmer.golang.org/try?commit=128457ce Please don’t reply on this GitHub thread. Visit golang.org/cl/195043. |
Message from Gobot Gobot: Patch Set 3: TryBot-Result 1 TryBots are happy. Please don’t reply on this GitHub thread. Visit golang.org/cl/195043. |
Add quotes when marshaling a json.Number with the string option set via a struct tag. This ensures that the resulting json can be unmarshaled into the source struct without error. Fixes #34268 Change-Id: Ide167d9dec77019554870b5957b37dc258119d81 GitHub-Last-Rev: dde81b7 GitHub-Pull-Request: #34269 Reviewed-on: https://go-review.googlesource.com/c/go/ /195043 Reviewed-by: Daniel Martí <[email protected]> Run-TryBot: Daniel Martí <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
This PR is being closed because golang.org/cl/195043 has been merged. |
Add quotes when marshaling a json.Number with the string option set via a struct tag. This ensures that the resulting json can be unmarshaled into the source struct without error. Fixes #34268 Change-Id: Ide167d9dec77019554870b5957b37dc258119d81 GitHub-Last-Rev: dde81b71208be01c253bb87dbb6f81ac6e0785be GitHub-Pull-Request: golang/go#34269 Reviewed-on: https://go-review.googlesource.com/c/go/ /195043 Reviewed-by: Daniel Martí <[email protected]> Run-TryBot: Daniel Martí <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
Add quotes when marshaling a json.Number with the string option set via a struct tag. This ensures that the resulting json can be unmarshaled into the source struct without error. Fixes #34268 Change-Id: Ide167d9dec77019554870b5957b37dc258119d81 GitHub-Last-Rev: dde81b71208be01c253bb87dbb6f81ac6e0785be GitHub-Pull-Request: golang/go#34269 Reviewed-on: https://go-review.googlesource.com/c/go/ /195043 Reviewed-by: Daniel Martí <[email protected]> Run-TryBot: Daniel Martí <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
Add quotes when marshaling a json.Number with the string option set via a struct tag. This ensures that the resulting json can be unmarshaled into the source struct without error. Fixes #34268 Change-Id: Ide167d9dec77019554870b5957b37dc258119d81 GitHub-Last-Rev: dde81b71208be01c253bb87dbb6f81ac6e0785be GitHub-Pull-Request: golang/go#34269 Reviewed-on: https://go-review.googlesource.com/c/go/ /195043 Reviewed-by: Daniel Martí <[email protected]> Run-TryBot: Daniel Martí <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
Add quotes when marshaling a json.Number with the string option set via a struct tag. This ensures that the resulting json can be unmarshaled into the source struct without error. Fixes #34268 Change-Id: Ide167d9dec77019554870b5957b37dc258119d81 GitHub-Last-Rev: dde81b71208be01c253bb87dbb6f81ac6e0785be GitHub-Pull-Request: golang/go#34269 Reviewed-on: https://go-review.googlesource.com/c/go/ /195043 Reviewed-by: Daniel Martí <[email protected]> Run-TryBot: Daniel Martí <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
Add quotes when marshaling a json.Number with the string option
set via a struct tag. This ensures that the resulting json
can be unmarshaled into the source struct without error.
Fixes #34268