OLD | NEW |
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 /** | 5 /** |
6 * This provides a general-purpose serialization facility for Dart objects. A | 6 * This provides a general-purpose serialization facility for Dart objects. A |
7 * [Serialization] is defined in terms of [SerializationRule]s and supports | 7 * [Serialization] is defined in terms of [SerializationRule]s and supports |
8 * reading and writing to different formats. | 8 * reading and writing to different formats. |
9 * | 9 * |
10 * ## Installing ## | 10 * ## Installing ## |
(...skipping 192 matching lines...) Loading... |
203 * [pub]: http://pub.dartlang.org | 203 * [pub]: http://pub.dartlang.org |
204 * [pkg]: http://pub.dartlang.org/packages/serialization | 204 * [pkg]: http://pub.dartlang.org/packages/serialization |
205 */ | 205 */ |
206 library serialization; | 206 library serialization; |
207 | 207 |
208 import 'src/mirrors_helpers.dart'; | 208 import 'src/mirrors_helpers.dart'; |
209 import 'src/serialization_helpers.dart'; | 209 import 'src/serialization_helpers.dart'; |
210 import 'dart:async'; | 210 import 'dart:async'; |
211 import 'dart:json' as json; | 211 import 'dart:json' as json; |
212 import 'dart:collection'; | 212 import 'dart:collection'; |
213 import 'dart:uri'; | |
214 | 213 |
215 part 'src/reader_writer.dart'; | 214 part 'src/reader_writer.dart'; |
216 part 'src/serialization_rule.dart'; | 215 part 'src/serialization_rule.dart'; |
217 part 'src/basic_rule.dart'; | 216 part 'src/basic_rule.dart'; |
218 part 'src/format.dart'; | 217 part 'src/format.dart'; |
219 | 218 |
220 /** | 219 /** |
221 * This class defines a particular serialization scheme, in terms of | 220 * This class defines a particular serialization scheme, in terms of |
222 * [SerializationRule] instances, and supports reading and writing them. | 221 * [SerializationRule] instances, and supports reading and writing them. |
223 * See library comment for examples of usage. | 222 * See library comment for examples of usage. |
(...skipping 273 matching lines...) Loading... |
497 } | 496 } |
498 | 497 |
499 /** | 498 /** |
500 * An exception class for errors during serialization. | 499 * An exception class for errors during serialization. |
501 */ | 500 */ |
502 class SerializationException implements Exception { | 501 class SerializationException implements Exception { |
503 final String message; | 502 final String message; |
504 const SerializationException([this.message]); | 503 const SerializationException([this.message]); |
505 toString() => "SerializationException($message)"; | 504 toString() => "SerializationException($message)"; |
506 } | 505 } |
OLD | NEW |