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

Unified Diff: pkg/polymer/lib/src/compiler.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/polymer/lib/src/compiler.dart
diff --git a/pkg/polymer/lib/src/compiler.dart b/pkg/polymer/lib/src/compiler.dart
index 5e2c98f4238019f05062a9c45941b43928d780fe..52f02de08a1bb940841809ccff0a34dcb0ec5397 100644
--- a/pkg/polymer/lib/src/compiler.dart
+++ b/pkg/polymer/lib/src/compiler.dart
@@ -6,7 +6,7 @@ library compiler;
import 'dart:async';
import 'dart:collection' show SplayTreeMap;
-import 'dart:json' as json;
+import 'dart:convert';
import 'package:analyzer_experimental/src/generated/ast.dart' show Directive, UriBasedDirective;
import 'package:csslib/visitor.dart' show StyleSheet, treeToDebugString;
@@ -746,13 +746,13 @@ class Compiler {
var sourcePath = dartCodeUrl != null ? dartCodeUrl.resolvedPath : null;
output.add(new OutputFile(libPath, printer.text, source: sourcePath));
// Fix-up the paths in the source map file
- var sourceMap = json.parse(printer.map);
+ var sourceMap = JSON.decode(printer.map);
var urls = sourceMap['sources'];
for (int i = 0; i < urls.length; i++) {
urls[i] = path.relative(urls[i], from: dir);
}
output.add(new OutputFile(path.join(dir, '$filename.map'),
- json.stringify(sourceMap)));
+ JSON.encode(sourceMap)));
}
_time(String logMessage, String filePath, callback(),

Powered by Google App Engine
This is Rietveld 408576698