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/command/list_package_dirs.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/command/list_package_dirs.dart
diff --git a/sdk/lib/_internal/pub/lib/src/command/list_package_dirs.dart b/sdk/lib/_internal/pub/lib/src/command/list_package_dirs.dart
index fc05630b2db2b04a808f0bc7e78ebd335022c92a..f16ad65fd3be5877e4af37ee3ebed84db93e6006 100644
--- a/sdk/lib/_internal/pub/lib/src/command/list_package_dirs.dart
+++ b/sdk/lib/_internal/pub/lib/src/command/list_package_dirs.dart
@@ -5,8 +5,8 @@
library pub.command.list_package_dirs;
import 'dart:async';
+import 'dart:convert';
import 'dart:io';
-import 'dart:json' as json;
import 'package:path/path.dart' as path;
@@ -28,7 +28,7 @@ class ListPackageDirsCommand extends PubCommand {
Future onRun() {
if (!entrypoint.lockFileExists) {
- log.error(json.stringify(
+ log.error(JSON.encode(
'Package "myapp" has no lockfile. Please run "pub install" first.'));
exit(exit_codes.NO_INPUT);
}
@@ -55,7 +55,7 @@ class ListPackageDirsCommand extends PubCommand {
output["input_files"] = [entrypoint.lockFilePath];
return Future.wait(futures).then((_) {
- log.message(json.stringify(output));
+ log.message(JSON.encode(output));
});
}
}

Powered by Google App Engine
This is Rietveld 408576698