Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(264)

Issue 2612233003: Always serialize 64-bit integers as strings in JSON. (Closed)

Created:
3 years, 11 months ago by Jakob Roland Andersen
Modified:
3 years, 11 months ago
Reviewers:
skybrian
CC:
reviews_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Always serialize 64-bit integers as strings in JSON. This improves compatibility with some other implementations that only expect strings. Existing implementations using the previous format should handle both strings and numbers, so switching to pure strings should be safe. There is a slight performance impact to this, but only really noticeable on messages with 100's of repeated int64 fields, so we decided against adding an option for this. BUG=https://github.com/dart-lang/dart-protobuf/issues/58 R=skybrian@google.com Committed: https://github.com/dart-lang/protobuf/commit/221343212db09a35bb9383cb6f3a97c6f3681956

Patch Set 1 #

Patch Set 2 : Add test for JSON-coding of int64s #

Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -14 lines) Patch
M lib/src/protobuf/json.dart View 2 chunks +0 lines, -8 lines 0 comments Download
M test/event_test.dart View 1 2 chunks +2 lines, -2 lines 0 comments Download
M test/json_test.dart View 1 2 chunks +11 lines, -0 lines 0 comments Download
M test/map_mixin_test.dart View 1 2 chunks +4 lines, -3 lines 0 comments Download
M test/mock_util.dart View 1 3 chunks +6 lines, -1 line 0 comments Download

Messages

Total messages: 9 (2 generated)
Jakob Roland Andersen
3 years, 11 months ago (2017-01-06 10:41:03 UTC) #2
skybrian
LGTM. I'm surprised no tests were affected. Maybe write one?
3 years, 11 months ago (2017-01-06 20:17:35 UTC) #3
Jakob Roland Andersen
On 2017/01/06 20:17:35, skybrian wrote: > LGTM. I'm surprised no tests were affected. Maybe write ...
3 years, 11 months ago (2017-01-09 12:25:16 UTC) #4
skybrian
On 2017/01/09 12:25:16, Jakob Roland Andersen wrote: > On 2017/01/06 20:17:35, skybrian wrote: > > ...
3 years, 11 months ago (2017-01-10 07:34:53 UTC) #5
skybrian
On 2017/01/10 07:34:53, skybrian wrote: > On 2017/01/09 12:25:16, Jakob Roland Andersen wrote: > > ...
3 years, 11 months ago (2017-01-10 07:37:12 UTC) #6
Jakob Roland Andersen
On 2017/01/10 07:37:12, skybrian wrote: > On 2017/01/10 07:34:53, skybrian wrote: > > On 2017/01/09 ...
3 years, 11 months ago (2017-01-10 08:53:05 UTC) #7
Jakob Roland Andersen
3 years, 11 months ago (2017-01-10 08:53:19 UTC) #9
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
221343212db09a35bb9383cb6f3a97c6f3681956 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698