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

Unified Diff: sdk/lib/_internal/pub/lib/src/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: sdk/lib/_internal/pub/lib/src/utils.dart
diff --git a/sdk/lib/_internal/pub/lib/src/utils.dart b/sdk/lib/_internal/pub/lib/src/utils.dart
index d4955167a0f14fe50655f200ea327bf1fb621ccc..ed2e5e382f0ffbefc42a8856bec7f1df93123ed5 100644
--- a/sdk/lib/_internal/pub/lib/src/utils.dart
+++ b/sdk/lib/_internal/pub/lib/src/utils.dart
@@ -7,7 +7,7 @@ library pub.utils;
import 'dart:async';
import 'dart:io';
-import 'dart:json' as json;
+import "dart:convert";
import 'dart:mirrors';
import "package:crypto/crypto.dart";
@@ -494,7 +494,7 @@ String yamlToString(data) {
var keyString = key;
if (key is! String || !_unquotableYamlString.hasMatch(key)) {
- keyString = json.stringify(key);
+ keyString = JSON.encode(key);
}
buffer.write('$indent$keyString:');
@@ -510,7 +510,7 @@ String yamlToString(data) {
// Don't quote plain strings if not needed.
if (data is! String || !_unquotableYamlString.hasMatch(data)) {
- string = json.stringify(data);
+ string = JSON.encode(data);
}
if (isMapValue) {

Powered by Google App Engine
This is Rietveld 408576698