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

Unified Diff: pkg/http/test/utils.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/http/test/utils.dart
diff --git a/pkg/http/test/utils.dart b/pkg/http/test/utils.dart
index 7b42bec00163174423f894406575da2c02f1dfec..f9a73813ac83756dd26328b0174c8f67c34363e8 100644
--- a/pkg/http/test/utils.dart
+++ b/pkg/http/test/utils.dart
@@ -7,7 +7,6 @@ library test_utils;
import 'dart:async';
import 'dart:convert';
import 'dart:io';
-import 'dart:json' as json;
import 'package:http/src/byte_stream.dart';
import 'package:http/src/utils.dart';
@@ -96,7 +95,7 @@ Future startServer() {
content['headers'][name] = values;
});
- var body = json.stringify(content);
+ var body = JSON.encode(content);
response.contentLength = body.length;
response.write(body);
response.close();
@@ -154,7 +153,7 @@ class _Parse extends Matcher {
var parsed;
try {
- parsed = json.parse(item);
+ parsed = JSON.decode(item);
} catch (e) {
return false;
}

Powered by Google App Engine
This is Rietveld 408576698