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

Unified Diff: sdk/lib/_internal/pub/test/validator/dependency_test.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/test/validator/dependency_test.dart
diff --git a/sdk/lib/_internal/pub/test/validator/dependency_test.dart b/sdk/lib/_internal/pub/test/validator/dependency_test.dart
index ba29373aa83305e7521a21c73c533839b2097248..53dfff98294307f7ef7b857bd48341266a2fcb9e 100644
--- a/sdk/lib/_internal/pub/test/validator/dependency_test.dart
+++ b/sdk/lib/_internal/pub/test/validator/dependency_test.dart
@@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
import 'dart:async';
-import 'dart:json' as json;
+import 'dart:convert';
import 'package:http/http.dart' as http;
import 'package:http/testing.dart';
@@ -40,7 +40,7 @@ setUpDependency(Map dep, {List<String> hostedVersions}) {
if (hostedVersions == null) {
return new Future.value(new http.Response("not found", 404));
} else {
- return new Future.value(new http.Response(json.stringify({
+ return new Future.value(new http.Response(JSON.encode({
"name": "foo",
"uploaders": ["nweiz@google.com"],
"versions": hostedVersions.map((version) =>
@@ -170,7 +170,7 @@ main() {
d.libPubspec("test_pkg", "1.0.0", deps: {
"foo": "any"
}),
- d.file("pubspec.lock", json.stringify({
+ d.file("pubspec.lock", JSON.encode({
'packages': {
'bar': {
'version': '1.2.3',
@@ -196,7 +196,7 @@ main() {
d.libPubspec("test_pkg", "1.0.0", deps: {
"foo": "any"
}),
- d.file("pubspec.lock", json.stringify({
+ d.file("pubspec.lock", JSON.encode({
'packages': {
'foo': {
'version': '1.2.3',
@@ -219,7 +219,7 @@ main() {
d.libPubspec("test_pkg", "1.0.0", deps: {
"foo": "any"
}),
- d.file("pubspec.lock", json.stringify({
+ d.file("pubspec.lock", JSON.encode({
'packages': {
'foo': {
'version': '0.1.2',

Powered by Google App Engine
This is Rietveld 408576698