Chromium Code Reviews| Index: sdk/lib/_internal/lib/convert_patch.dart |
| diff --git a/sdk/lib/_internal/lib/json_patch.dart b/sdk/lib/_internal/lib/convert_patch.dart |
| similarity index 94% |
| rename from sdk/lib/_internal/lib/json_patch.dart |
| rename to sdk/lib/_internal/lib/convert_patch.dart |
| index ad22ae7d1aa4d8f71b957e8076a147f697bce517..5fc2014adf4e6e1bd740472d795aa33f59f93220 100644 |
| --- a/sdk/lib/_internal/lib/json_patch.dart |
| +++ b/sdk/lib/_internal/lib/convert_patch.dart |
| @@ -23,14 +23,14 @@ import 'dart:_interceptors' show JSExtendableArray; |
| * |
| * Throws [FormatException] if the input is not valid JSON text. |
| */ |
| -patch parse(String json, [reviver(var key, var value)]) { |
| - if (json is! String) throw new ArgumentError(json); |
| +patch _parseJson(String source, reviver(var key, var value)) { |
| + if (source is! String) throw new ArgumentError(source); |
| var parsed; |
| try { |
| parsed = JS('=Object|JSExtendableArray|Null|bool|num|String', |
| 'JSON.parse(#)', |
| - json); |
| + source); |
| } catch (e) { |
| throw new FormatException(JS('String', 'String(#)', e)); |
| } |
| @@ -90,5 +90,5 @@ _convertJsonToDart(json, reviver(key, value)) { |
| return map; |
| } |
| - return revive('', walk(json)); |
| + return revive(null, walk(json)); |
|
floitsch
2013/08/27 13:25:40
Let's do this change in a separate CL.
Otherwise i
Lasse Reichstein Nielsen
2013/08/28 08:02:59
Done.
|
| } |