Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(4976)

Issue 5049043: code review 5049043: [release-branch.r60] json: add struct tag option to wra... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 7 months ago by adg
Modified:
12 years, 7 months ago
Reviewers:
CC:
dsymonds, golang-dev
Visibility:
Public.

Description

[release-branch.r60] json: add struct tag option to wrap literals in strings ««« CL 4918051 / ba6daf799367 json: add struct tag option to wrap literals in strings Since JavaScript doesn't have [u]int64 types, some JSON APIs encode such types as strings to avoid losing precision. This adds a new struct tag option ",string" to cause fields to be wrapped in JSON strings on encoding and unwrapped from strings when decoding. R=rsc, gustavo CC=golang-dev http://codereview.appspot.com/4918051 »»»

Patch Set 1 #

Patch Set 2 : diff -r d5e97874fe84 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r d5e97874fe84 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+175 lines, -32 lines) Patch
M src/pkg/json/Makefile View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/pkg/json/decode.go View 1 7 chunks +18 lines, -14 lines 0 comments Download
M src/pkg/json/decode_test.go View 1 4 chunks +5 lines, -0 lines 0 comments Download
M src/pkg/json/encode.go View 1 8 chunks +41 lines, -18 lines 0 comments Download
M src/pkg/json/encode_test.go View 1 2 chunks +38 lines, -0 lines 0 comments Download
A src/pkg/json/tags.go View 1 1 chunk +44 lines, -0 lines 0 comments Download
A src/pkg/json/tags_test.go View 1 1 chunk +28 lines, -0 lines 0 comments Download

Messages

Total messages: 3
adg
Hello dsymonds (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
12 years, 7 months ago (2011-09-19 01:55:30 UTC) #1
dsymonds
LGTM
12 years, 7 months ago (2011-09-19 01:57:55 UTC) #2
adg
12 years, 7 months ago (2011-09-19 01:59:27 UTC) #3
*** Submitted as http://code.google.com/p/go/source/detail?r=4f0e6269213f ***

[release-branch.r60] json: add struct tag option to wrap literals in strings

««« CL 4918051 / ba6daf799367
json: add struct tag option to wrap literals in strings

Since JavaScript doesn't have [u]int64 types, some JSON APIs
encode such types as strings to avoid losing precision.

This adds a new struct tag option ",string" to cause
fields to be wrapped in JSON strings on encoding
and unwrapped from strings when decoding.

R=rsc, gustavo
CC=golang-dev
http://codereview.appspot.com/4918051
»»»

R=dsymonds
CC=golang-dev
http://codereview.appspot.com/5049043
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b