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

Unified Diff: pkg/serialization/lib/serialization.dart

Issue 11931030: Add a MapRule (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Changes from review comments Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/serialization/lib/src/basic_rule.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/serialization/lib/serialization.dart
diff --git a/pkg/serialization/lib/serialization.dart b/pkg/serialization/lib/serialization.dart
index 8a95659da27a95ffbb0671e50432f55647d13b9d..4e1b4524dbec951e126c6abb889c700dc097ef25 100644
--- a/pkg/serialization/lib/serialization.dart
+++ b/pkg/serialization/lib/serialization.dart
@@ -183,7 +183,9 @@ import 'src/mirrors_helpers.dart';
import 'src/serialization_helpers.dart';
import 'dart:async';
import 'dart:json' as json;
-import 'dart:collection' show Queue;
+import 'dart:collection';
+// TODO(alanknight): Ugh. Remove this if we can resolve bug 7982/7940.
+import 'dart:collection-dev';
part 'src/reader_writer.dart';
part 'src/serialization_rule.dart';
@@ -311,6 +313,7 @@ class Serialization {
// Both these rules apply to lists, so unless otherwise indicated,
// it will always find the first one.
addRule(new ListRuleEssential());
+ addRule(new MapRule());
}
/**
@@ -426,6 +429,7 @@ class Serialization {
var meta = new Serialization()
..selfDescribing = false
..addRuleFor(new ListRule())
+ ..addRuleFor(new MapRule())
..addRuleFor(new PrimitiveRule())
..addRuleFor(new ListRuleEssential())
..addRuleFor(basicRule,
@@ -463,4 +467,5 @@ class Serialization {
class SerializationException implements Exception {
final String message;
const SerializationException([this.message]);
+ toString() => "SerializationException($message)";
}
« no previous file with comments | « no previous file | pkg/serialization/lib/src/basic_rule.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698