| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |