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

Unified Diff: pkg/http/lib/testing.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/lib/testing.dart
diff --git a/pkg/http/lib/testing.dart b/pkg/http/lib/testing.dart
index 9fe7b0618460ee4bb40e9508dc04dc7f128b520d..45d2c610a5da85d96b8d60e95775e2015e71f416 100644
--- a/pkg/http/lib/testing.dart
+++ b/pkg/http/lib/testing.dart
@@ -8,14 +8,14 @@
/// allows test code to set up a local request handler in order to fake a server
/// that responds to HTTP requests:
///
-/// import 'dart:json' as json;
+/// import 'dart:convert';
/// import 'package:http/testing.dart';
///
/// var client = new MockClient((request) {
/// if (request.url.path != "/data.json") {
/// return new Response("", 404);
/// }
-/// return new Response(json.stringify({
+/// return new Response(JSON.encode({
/// 'numbers': [1, 4, 15, 19, 214]
/// }, 200, headers: {
/// 'content-type': 'application/json'

Powered by Google App Engine
This is Rietveld 408576698