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

Side by Side Diff: runtime/lib/convert_patch.dart

Issue 1980663002: Make json-maps implement Map<String, dynamic>. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Changelog and test updates Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « CHANGELOG.md ('k') | sdk/lib/_internal/js_runtime/lib/convert_patch.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import "dart:_internal" show POWERS_OF_TEN; 5 import "dart:_internal" show POWERS_OF_TEN;
6 6
7 // JSON conversion. 7 // JSON conversion.
8 8
9 @patch 9 @patch
10 _parseJson(String source, reviver(key, value)) { 10 _parseJson(String source, reviver(key, value)) {
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 void handleBool(bool value) { 135 void handleBool(bool value) {
136 this.value = value; 136 this.value = value;
137 } 137 }
138 138
139 void handleNull() { 139 void handleNull() {
140 this.value = null; 140 this.value = null;
141 } 141 }
142 142
143 void beginObject() { 143 void beginObject() {
144 pushContainer(); 144 pushContainer();
145 currentContainer = {}; 145 currentContainer = <String, dynamic>{};
146 } 146 }
147 147
148 void propertyName() { 148 void propertyName() {
149 key = value; 149 key = value;
150 value = null; 150 value = null;
151 } 151 }
152 152
153 void propertyValue() { 153 void propertyValue() {
154 Map map = currentContainer; 154 Map map = currentContainer;
155 map[key] = value; 155 map[key] = value;
(...skipping 1645 matching lines...) Expand 10 before | Expand all | Expand 10 after
1801 _parser.parse(start); 1801 _parser.parse(start);
1802 } 1802 }
1803 1803
1804 void close() { 1804 void close() {
1805 _parser.close(); 1805 _parser.close();
1806 var decoded = _parser.result; 1806 var decoded = _parser.result;
1807 _sink.add(decoded); 1807 _sink.add(decoded);
1808 _sink.close(); 1808 _sink.close();
1809 } 1809 }
1810 } 1810 }
OLDNEW
« no previous file with comments | « CHANGELOG.md ('k') | sdk/lib/_internal/js_runtime/lib/convert_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698