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

Unified Diff: sdk/lib/_internal/pub/lib/src/http.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: sdk/lib/_internal/pub/lib/src/http.dart
diff --git a/sdk/lib/_internal/pub/lib/src/http.dart b/sdk/lib/_internal/pub/lib/src/http.dart
index a54f02f26ae0897790e5f9c5b48788366c4709ad..9fc338eb031e87c337d6da87579891244e7fb257 100644
--- a/sdk/lib/_internal/pub/lib/src/http.dart
+++ b/sdk/lib/_internal/pub/lib/src/http.dart
@@ -6,8 +6,8 @@
library pub.http;
import 'dart:async';
+import 'dart:convert';
import 'dart:io';
-import 'dart:json' as json;
import 'package:http/http.dart' as http;
@@ -203,7 +203,7 @@ void handleJsonError(http.Response response) {
Map parseJsonResponse(http.Response response) {
var value;
try {
- value = json.parse(response.body);
+ value = JSON.decode(response.body);
} on FormatException catch (e) {
invalidServerResponse(response);
}

Powered by Google App Engine
This is Rietveld 408576698