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

Issue 25548010: Make JSON encoder take extra function argument to use instead of toJson calls. (Closed)

Created:
7 years, 2 months ago by Lasse Reichstein Nielsen
Modified:
7 years, 2 months ago
Reviewers:
floitsch, kevmoo-old
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Make JSON encoder take extra function argument to use instead of toJson calls. Defaults to callin toJson() on unconvertible objects. R=floitsch@google.com Committed: https://code.google.com/p/dart/source/detail?r=28507

Patch Set 1 #

Total comments: 7

Patch Set 2 : Make fields final #

Patch Set 3 : Merge to head. #

Patch Set 4 : Rename convert function to "toEncodable". #

Unified diffs Side-by-side diffs Delta from patch set Stats (+98 lines, -53 lines) Patch
M pkg/json/lib/json.dart View 1 6 chunks +10 lines, -11 lines 0 comments Download
M sdk/lib/convert/json.dart View 1 2 3 7 chunks +43 lines, -12 lines 0 comments Download
M sdk/lib/json/json.dart View 1 2 3 8 chunks +33 lines, -28 lines 0 comments Download
M tests/json/json_test.dart View 2 chunks +12 lines, -2 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Lasse Reichstein Nielsen
7 years, 2 months ago (2013-10-04 14:04:40 UTC) #1
floitsch
LGTM except for the name. I would really like if we could come up with ...
7 years, 2 months ago (2013-10-04 15:25:08 UTC) #2
kevmoo-old
DBR https://codereview.chromium.org/25548010/diff/1/pkg/json/lib/json.dart File pkg/json/lib/json.dart (right): https://codereview.chromium.org/25548010/diff/1/pkg/json/lib/json.dart#newcode670 pkg/json/lib/json.dart:670: StringSink sink; final * 2
7 years, 2 months ago (2013-10-04 16:31:08 UTC) #3
Lasse Reichstein Nielsen
https://codereview.chromium.org/25548010/diff/1/pkg/json/lib/json.dart File pkg/json/lib/json.dart (right): https://codereview.chromium.org/25548010/diff/1/pkg/json/lib/json.dart#newcode670 pkg/json/lib/json.dart:670: StringSink sink; On 2013/10/04 16:31:08, kevmoo wrote: > final ...
7 years, 2 months ago (2013-10-07 12:46:59 UTC) #4
Sean Eagan
https://codereview.chromium.org/25548010/diff/1/sdk/lib/convert/json.dart File sdk/lib/convert/json.dart (right): https://codereview.chromium.org/25548010/diff/1/sdk/lib/convert/json.dart#newcode104 sdk/lib/convert/json.dart:104: Object encode(Object value, { convert(var object) }) { On ...
7 years, 2 months ago (2013-10-07 15:24:31 UTC) #5
Lasse Reichstein Nielsen
7 years, 2 months ago (2013-10-11 11:34:56 UTC) #6
Message was sent while issue was closed.
Committed patchset #4 manually as r28507 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698