OLD | NEW |
1 dart_library.library('dart/convert', null, /* Imports */[ | 1 dart_library.library('dart/convert', null, /* Imports */[ |
2 'dart/_runtime', | 2 'dart/_runtime', |
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 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1166 dart.throw(new JsonUnsupportedObjectError(object)); | 1166 dart.throw(new JsonUnsupportedObjectError(object)); |
1167 } | 1167 } |
1168 this[_removeSeen](object); | 1168 this[_removeSeen](object); |
1169 } catch (e) { | 1169 } catch (e) { |
1170 dart.throw(new JsonUnsupportedObjectError(object, {cause: e})); | 1170 dart.throw(new JsonUnsupportedObjectError(object, {cause: e})); |
1171 } | 1171 } |
1172 | 1172 |
1173 } | 1173 } |
1174 writeJsonValue(object) { | 1174 writeJsonValue(object) { |
1175 if (typeof object == 'number') { | 1175 if (typeof object == 'number') { |
1176 if (!dart.notNull(dart.as(dart.dload(object, 'isFinite'), core.bool))) r
eturn false; | 1176 if (!dart.notNull(object[dartx.isFinite])) return false; |
1177 this.writeNumber(dart.as(object, core.num)); | 1177 this.writeNumber(object); |
1178 return true; | 1178 return true; |
1179 } else if (dart.notNull(core.identical(object, true))) { | 1179 } else if (dart.notNull(core.identical(object, true))) { |
1180 this.writeString('true'); | 1180 this.writeString('true'); |
1181 return true; | 1181 return true; |
1182 } else if (dart.notNull(core.identical(object, false))) { | 1182 } else if (dart.notNull(core.identical(object, false))) { |
1183 this.writeString('false'); | 1183 this.writeString('false'); |
1184 return true; | 1184 return true; |
1185 } else if (object == null) { | 1185 } else if (object == null) { |
1186 this.writeString('null'); | 1186 this.writeString('null'); |
1187 return true; | 1187 return true; |
1188 } else if (typeof object == 'string') { | 1188 } else if (typeof object == 'string') { |
1189 this.writeString('"'); | 1189 this.writeString('"'); |
1190 this.writeStringContent(dart.as(object, core.String)); | 1190 this.writeStringContent(object); |
1191 this.writeString('"'); | 1191 this.writeString('"'); |
1192 return true; | 1192 return true; |
1193 } else if (dart.is(object, core.List)) { | 1193 } else if (dart.is(object, core.List)) { |
1194 this[_checkCycle](object); | 1194 this[_checkCycle](object); |
1195 this.writeList(dart.as(object, core.List)); | 1195 this.writeList(object); |
1196 this[_removeSeen](object); | 1196 this[_removeSeen](object); |
1197 return true; | 1197 return true; |
1198 } else if (dart.is(object, core.Map)) { | 1198 } else if (dart.is(object, core.Map)) { |
1199 this[_checkCycle](object); | 1199 this[_checkCycle](object); |
1200 this.writeMap(dart.as(object, core.Map$(core.String, core.Object))); | 1200 this.writeMap(dart.as(object, core.Map$(core.String, core.Object))); |
1201 this[_removeSeen](object); | 1201 this[_removeSeen](object); |
1202 return true; | 1202 return true; |
1203 } else { | 1203 } else { |
1204 return false; | 1204 return false; |
1205 } | 1205 } |
(...skipping 1606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2812 exports.LineSplitter = LineSplitter; | 2812 exports.LineSplitter = LineSplitter; |
2813 exports.StringConversionSink = StringConversionSink; | 2813 exports.StringConversionSink = StringConversionSink; |
2814 exports.ClosableStringSink = ClosableStringSink; | 2814 exports.ClosableStringSink = ClosableStringSink; |
2815 exports.UNICODE_REPLACEMENT_CHARACTER_RUNE = UNICODE_REPLACEMENT_CHARACTER_RUN
E; | 2815 exports.UNICODE_REPLACEMENT_CHARACTER_RUNE = UNICODE_REPLACEMENT_CHARACTER_RUN
E; |
2816 exports.UNICODE_BOM_CHARACTER_RUNE = UNICODE_BOM_CHARACTER_RUNE; | 2816 exports.UNICODE_BOM_CHARACTER_RUNE = UNICODE_BOM_CHARACTER_RUNE; |
2817 exports.Utf8Codec = Utf8Codec; | 2817 exports.Utf8Codec = Utf8Codec; |
2818 exports.UTF8 = UTF8; | 2818 exports.UTF8 = UTF8; |
2819 exports.Utf8Encoder = Utf8Encoder; | 2819 exports.Utf8Encoder = Utf8Encoder; |
2820 exports.Utf8Decoder = Utf8Decoder; | 2820 exports.Utf8Decoder = Utf8Decoder; |
2821 }); | 2821 }); |
OLD | NEW |