Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: sdk/lib/json/json.dart

Issue 17578002: pkg/serialization: add format param to Serialization.read method (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: A few more tweaks Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 library dart.json; 5 library dart.json;
6 6
7 // JSON parsing and serialization. 7 // JSON parsing and serialization.
8 8
9 /** 9 /**
10 * Error thrown by JSON serialization if an object cannot be serialized. 10 * Error thrown by JSON serialization if an object cannot be serialized.
(...skipping 30 matching lines...) Expand all
41 * When the cycle is detected, a [JsonCyclicError] is thrown. 41 * When the cycle is detected, a [JsonCyclicError] is thrown.
42 */ 42 */
43 class JsonCyclicError extends JsonUnsupportedObjectError { 43 class JsonCyclicError extends JsonUnsupportedObjectError {
44 /** The first object that was detected as part of a cycle. */ 44 /** The first object that was detected as part of a cycle. */
45 JsonCyclicError(Object object): super(object); 45 JsonCyclicError(Object object): super(object);
46 String toString() => "Cyclic error in JSON stringify"; 46 String toString() => "Cyclic error in JSON stringify";
47 } 47 }
48 48
49 49
50 /** 50 /**
51 * Parses [json] and build the corresponding parsed JSON value. 51 * Parses JSON and build the corresponding parsed JSON value.
52 * 52 *
53 * Parsed JSON values are of the types [num], [String], [bool], [Null], 53 * Parsed JSON values are of the types [num], [String], [bool], [Null],
54 * [List]s of parsed JSON values or [Map]s from [String] to parsed 54 * [List]s of parsed JSON values or [Map]s from [String] to parsed
55 * JSON values. 55 * JSON values.
56 * 56 *
57 * The optional [revivier] function, if provided, is called once for each 57 * The optional [revivier] function, if provided, is called once for each
58 * object or list property parsed. The arguments are the property name 58 * object or list property parsed. The arguments are the property name
59 * ([String]) or list index ([int]), and the value is the parsed value. 59 * ([String]) or list index ([int]), and the value is the parsed value.
60 * The return value of the revivier will be used as the value of that property 60 * The return value of the revivier will be used as the value of that property
61 * instead the parsed value. 61 * instead the parsed value.
(...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 first = false; 817 first = false;
818 }); 818 });
819 sb.write('}'); 819 sb.write('}');
820 seen.removeLast(); 820 seen.removeLast();
821 return true; 821 return true;
822 } else { 822 } else {
823 return false; 823 return false;
824 } 824 }
825 } 825 }
826 } 826 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698