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

Unified Diff: pkg/serialization/test/serialization_test.dart

Issue 23596007: Remove usage of dart:json. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase. Created 7 years, 4 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
Index: pkg/serialization/test/serialization_test.dart
diff --git a/pkg/serialization/test/serialization_test.dart b/pkg/serialization/test/serialization_test.dart
index 3cb5a75584c5e7e207370496359f7f089c1f7f8e..83232c91ace606b1a8c3158892a1e0bbec8ecc0a 100644
--- a/pkg/serialization/test/serialization_test.dart
+++ b/pkg/serialization/test/serialization_test.dart
@@ -4,7 +4,7 @@
library serialization_test;
-import 'dart:json' as json;
+import 'dart:convert';
import 'package:unittest/unittest.dart';
import 'package:serialization/serialization.dart';
import 'package:serialization/src/serialization_helpers.dart';
@@ -366,8 +366,8 @@ void main() {
test("Straight JSON format", () {
var s = new Serialization();
var writer = s.newWriter(const SimpleJsonFormat());
- var out = json.stringify(writer.write(a1));
- var reconstituted = json.parse(out);
+ var out = JSON.encode(writer.write(a1));
+ var reconstituted = JSON.decode(out);
expect(reconstituted.length, 4);
expect(reconstituted[0], "Seattle");
});
@@ -378,8 +378,8 @@ void main() {
var addressRule = s.addRuleFor(Address)..configureForMaps();
var personRule = s.addRuleFor(Person)..configureForMaps();
var writer = s.newWriter(const SimpleJsonFormat(storeRoundTripInfo: true));
- var out = json.stringify(writer.write(p1));
- var reconstituted = json.parse(out);
+ var out = JSON.encode(writer.write(p1));
+ var reconstituted = JSON.decode(out);
var expected = {
"name" : "Alice",
"rank" : null,

Powered by Google App Engine
This is Rietveld 408576698