OLD | NEW |
1 dart_library.library('dart/convert', null, /* Imports */[ | 1 dart_library.library('dart/convert', null, /* Imports */[ |
2 "dart_runtime/dart", | 2 "dart_runtime/dart", |
3 'dart/core', | 3 'dart/core', |
4 'dart/async', | 4 'dart/async', |
5 'dart/typed_data', | 5 'dart/typed_data', |
6 'dart/_internal', | 6 'dart/_internal', |
7 'dart/collection' | 7 'dart/collection' |
8 ], /* Lazy imports */[ | 8 ], /* Lazy imports */[ |
9 ], function(exports, dart, core, async, typed_data, _internal, collection) { | 9 ], function(exports, dart, core, async, typed_data, _internal, collection) { |
10 'use strict'; | 10 'use strict'; |
(...skipping 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1199 if (!dart.notNull(this.writeJsonValue(customJson))) { | 1199 if (!dart.notNull(this.writeJsonValue(customJson))) { |
1200 dart.throw(new JsonUnsupportedObjectError(object)); | 1200 dart.throw(new JsonUnsupportedObjectError(object)); |
1201 } | 1201 } |
1202 this[_removeSeen](object); | 1202 this[_removeSeen](object); |
1203 } catch (e) { | 1203 } catch (e) { |
1204 dart.throw(new JsonUnsupportedObjectError(object, {cause: e})); | 1204 dart.throw(new JsonUnsupportedObjectError(object, {cause: e})); |
1205 } | 1205 } |
1206 | 1206 |
1207 } | 1207 } |
1208 writeJsonValue(object) { | 1208 writeJsonValue(object) { |
1209 if (dart.is(object, core.num)) { | 1209 if (typeof object == 'number') { |
1210 if (!dart.notNull(dart.as(dart.dload(object, 'isFinite'), core.bool))) | 1210 if (!dart.notNull(dart.as(dart.dload(object, 'isFinite'), core.bool))) |
1211 return false; | 1211 return false; |
1212 this.writeNumber(dart.as(object, core.num)); | 1212 this.writeNumber(dart.as(object, core.num)); |
1213 return true; | 1213 return true; |
1214 } else if (dart.notNull(core.identical(object, true))) { | 1214 } else if (dart.notNull(core.identical(object, true))) { |
1215 this.writeString('true'); | 1215 this.writeString('true'); |
1216 return true; | 1216 return true; |
1217 } else if (dart.notNull(core.identical(object, false))) { | 1217 } else if (dart.notNull(core.identical(object, false))) { |
1218 this.writeString('false'); | 1218 this.writeString('false'); |
1219 return true; | 1219 return true; |
(...skipping 1675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2895 exports.LineSplitter = LineSplitter; | 2895 exports.LineSplitter = LineSplitter; |
2896 exports.StringConversionSink = StringConversionSink; | 2896 exports.StringConversionSink = StringConversionSink; |
2897 exports.ClosableStringSink = ClosableStringSink; | 2897 exports.ClosableStringSink = ClosableStringSink; |
2898 exports.UNICODE_REPLACEMENT_CHARACTER_RUNE = UNICODE_REPLACEMENT_CHARACTER_RUN
E; | 2898 exports.UNICODE_REPLACEMENT_CHARACTER_RUNE = UNICODE_REPLACEMENT_CHARACTER_RUN
E; |
2899 exports.UNICODE_BOM_CHARACTER_RUNE = UNICODE_BOM_CHARACTER_RUNE; | 2899 exports.UNICODE_BOM_CHARACTER_RUNE = UNICODE_BOM_CHARACTER_RUNE; |
2900 exports.Utf8Codec = Utf8Codec; | 2900 exports.Utf8Codec = Utf8Codec; |
2901 exports.UTF8 = UTF8; | 2901 exports.UTF8 = UTF8; |
2902 exports.Utf8Encoder = Utf8Encoder; | 2902 exports.Utf8Encoder = Utf8Encoder; |
2903 exports.Utf8Decoder = Utf8Decoder; | 2903 exports.Utf8Decoder = Utf8Decoder; |
2904 }); | 2904 }); |
OLD | NEW |