OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 import 'dart:fletch._system' show patch; | 6 import 'dart:dartino._system' show patch; |
7 | 7 |
8 // JSON conversion. | 8 // JSON conversion. |
9 | 9 |
10 @patch _parseJson(String json, reviver(var key, var value)) { | 10 @patch _parseJson(String json, reviver(var key, var value)) { |
11 _BuildJsonListener listener; | 11 _BuildJsonListener listener; |
12 if (reviver == null) { | 12 if (reviver == null) { |
13 listener = new _BuildJsonListener(); | 13 listener = new _BuildJsonListener(); |
14 } else { | 14 } else { |
15 listener = new _ReviverJsonListener(reviver); | 15 listener = new _ReviverJsonListener(reviver); |
16 } | 16 } |
(...skipping 1743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1760 _parser.parse(start); | 1760 _parser.parse(start); |
1761 } | 1761 } |
1762 | 1762 |
1763 void close() { | 1763 void close() { |
1764 _parser.close(); | 1764 _parser.close(); |
1765 var decoded = _parser.result; | 1765 var decoded = _parser.result; |
1766 _sink.add(decoded); | 1766 _sink.add(decoded); |
1767 _sink.close(); | 1767 _sink.close(); |
1768 } | 1768 } |
1769 } | 1769 } |
OLD | NEW |