| OLD | NEW |
| 1 var convert; | 1 var convert; |
| 2 (function(exports) { | 2 (function(exports) { |
| 3 'use strict'; | 3 'use strict'; |
| 4 let ASCII = new AsciiCodec(); | 4 let ASCII = new AsciiCodec(); |
| 5 let _ASCII_MASK = 127; | 5 let _ASCII_MASK = 127; |
| 6 let _allowInvalid = Symbol('_allowInvalid'); | 6 let _allowInvalid = Symbol('_allowInvalid'); |
| 7 let _nameToEncoding = Symbol('_nameToEncoding'); | 7 let _nameToEncoding = Symbol('_nameToEncoding'); |
| 8 let Codec$ = dart.generic(function(S, T) { | 8 let Codec$ = dart.generic(function(S, T) { |
| 9 class Codec extends core.Object { | 9 class Codec extends core.Object { |
| 10 Codec() { | 10 Codec() { |
| (...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 652 if (reviver == null) | 652 if (reviver == null) |
| 653 return this.decoder.convert(source); | 653 return this.decoder.convert(source); |
| 654 return new JsonDecoder(reviver).convert(source); | 654 return new JsonDecoder(reviver).convert(source); |
| 655 } | 655 } |
| 656 encode(value, opts) { | 656 encode(value, opts) { |
| 657 let toEncodable = opts && 'toEncodable' in opts ? opts.toEncodable : null; | 657 let toEncodable = opts && 'toEncodable' in opts ? opts.toEncodable : null; |
| 658 if (toEncodable == null) | 658 if (toEncodable == null) |
| 659 toEncodable = this[_toEncodable$]; | 659 toEncodable = this[_toEncodable$]; |
| 660 if (toEncodable == null) | 660 if (toEncodable == null) |
| 661 return this.encoder.convert(value); | 661 return this.encoder.convert(value); |
| 662 return new JsonEncoder(dart.closureWrap(toEncodable, "(Object) → Object"))
.convert(value); | 662 return new JsonEncoder(dart.as(toEncodable, dart.throw_("Unimplemented typ
e (Object) → Object"))).convert(value); |
| 663 } | 663 } |
| 664 get encoder() { | 664 get encoder() { |
| 665 if (this[_toEncodable$] == null) | 665 if (this[_toEncodable$] == null) |
| 666 return new JsonEncoder(); | 666 return new JsonEncoder(); |
| 667 return new JsonEncoder(dart.closureWrap(this[_toEncodable$], "(Object) → O
bject")); | 667 return new JsonEncoder(dart.as(this[_toEncodable$], dart.throw_("Unimpleme
nted type (Object) → Object"))); |
| 668 } | 668 } |
| 669 get decoder() { | 669 get decoder() { |
| 670 if (this[_reviver] == null) | 670 if (this[_reviver] == null) |
| 671 return new JsonDecoder(); | 671 return new JsonDecoder(); |
| 672 return new JsonDecoder(this[_reviver]); | 672 return new JsonDecoder(this[_reviver]); |
| 673 } | 673 } |
| 674 } | 674 } |
| 675 dart.defineNamedConstructor(JsonCodec, 'withReviver'); | 675 dart.defineNamedConstructor(JsonCodec, 'withReviver'); |
| 676 class JsonEncoder extends Converter$(core.Object, core.String) { | 676 class JsonEncoder extends Converter$(core.Object, core.String) { |
| 677 JsonEncoder(toEncodable) { | 677 JsonEncoder(toEncodable) { |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1011 for (let i = 1; dart.notNull(i) < dart.notNull(list.length); i = dart.no
tNull(i) + 1) { | 1011 for (let i = 1; dart.notNull(i) < dart.notNull(list.length); i = dart.no
tNull(i) + 1) { |
| 1012 this.writeString(','); | 1012 this.writeString(','); |
| 1013 this.writeObject(list.get(i)); | 1013 this.writeObject(list.get(i)); |
| 1014 } | 1014 } |
| 1015 } | 1015 } |
| 1016 this.writeString(']'); | 1016 this.writeString(']'); |
| 1017 } | 1017 } |
| 1018 writeMap(map) { | 1018 writeMap(map) { |
| 1019 this.writeString('{'); | 1019 this.writeString('{'); |
| 1020 let separator = '"'; | 1020 let separator = '"'; |
| 1021 map.forEach(dart.closureWrap(((key, value) => { | 1021 map.forEach(dart.as(((key, value) => { |
| 1022 this.writeString(separator); | 1022 this.writeString(separator); |
| 1023 separator = ',"'; | 1023 separator = ',"'; |
| 1024 this.writeStringContent(key); | 1024 this.writeStringContent(key); |
| 1025 this.writeString('":'); | 1025 this.writeString('":'); |
| 1026 this.writeObject(value); | 1026 this.writeObject(value); |
| 1027 }).bind(this), "(String, Object) → void")); | 1027 }).bind(this), dart.throw_("Unimplemented type (String, Object) → void")))
; |
| 1028 this.writeString('}'); | 1028 this.writeString('}'); |
| 1029 } | 1029 } |
| 1030 } | 1030 } |
| 1031 _JsonStringifier.BACKSPACE = 8; | 1031 _JsonStringifier.BACKSPACE = 8; |
| 1032 _JsonStringifier.TAB = 9; | 1032 _JsonStringifier.TAB = 9; |
| 1033 _JsonStringifier.NEWLINE = 10; | 1033 _JsonStringifier.NEWLINE = 10; |
| 1034 _JsonStringifier.CARRIAGE_RETURN = 13; | 1034 _JsonStringifier.CARRIAGE_RETURN = 13; |
| 1035 _JsonStringifier.FORM_FEED = 12; | 1035 _JsonStringifier.FORM_FEED = 12; |
| 1036 _JsonStringifier.QUOTE = 34; | 1036 _JsonStringifier.QUOTE = 34; |
| 1037 _JsonStringifier.CHAR_0 = 48; | 1037 _JsonStringifier.CHAR_0 = 48; |
| (...skipping 1331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2369 exports.LineSplitter = LineSplitter; | 2369 exports.LineSplitter = LineSplitter; |
| 2370 exports.StringConversionSink = StringConversionSink; | 2370 exports.StringConversionSink = StringConversionSink; |
| 2371 exports.ClosableStringSink = ClosableStringSink; | 2371 exports.ClosableStringSink = ClosableStringSink; |
| 2372 exports.UNICODE_REPLACEMENT_CHARACTER_RUNE = UNICODE_REPLACEMENT_CHARACTER_RUN
E; | 2372 exports.UNICODE_REPLACEMENT_CHARACTER_RUNE = UNICODE_REPLACEMENT_CHARACTER_RUN
E; |
| 2373 exports.UNICODE_BOM_CHARACTER_RUNE = UNICODE_BOM_CHARACTER_RUNE; | 2373 exports.UNICODE_BOM_CHARACTER_RUNE = UNICODE_BOM_CHARACTER_RUNE; |
| 2374 exports.UTF8 = UTF8; | 2374 exports.UTF8 = UTF8; |
| 2375 exports.Utf8Codec = Utf8Codec; | 2375 exports.Utf8Codec = Utf8Codec; |
| 2376 exports.Utf8Encoder = Utf8Encoder; | 2376 exports.Utf8Encoder = Utf8Encoder; |
| 2377 exports.Utf8Decoder = Utf8Decoder; | 2377 exports.Utf8Decoder = Utf8Decoder; |
| 2378 })(convert || (convert = {})); | 2378 })(convert || (convert = {})); |
| OLD | NEW |