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

Unified Diff: sdk/lib/_internal/dartdoc/lib/src/json_serializer.dart

Issue 11783009: Big merge from experimental to bleeding edge. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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/dartdoc/lib/src/json_serializer.dart
diff --git a/sdk/lib/_internal/dartdoc/lib/src/json_serializer.dart b/sdk/lib/_internal/dartdoc/lib/src/json_serializer.dart
index d67cd72e2bc5287e7328b30afb752bec34855908..8039d0c9c4570f03210725b8f036ecbe6c2dc6f2 100755
--- a/sdk/lib/_internal/dartdoc/lib/src/json_serializer.dart
+++ b/sdk/lib/_internal/dartdoc/lib/src/json_serializer.dart
@@ -9,8 +9,9 @@
*/
library json_serializer;
+import 'dart:async';
import 'dart:mirrors';
-import 'dart:json';
+import 'dart:json' as json;
String serialize(Object o) {
var printer = new JsonPrinter();
@@ -45,9 +46,8 @@ void _serializeObject(String name, Object o, JsonPrinter printer) {
// TODO(jacobr): this code works only because futures for mirrors return
// immediately.
for(String memberName in members) {
- mirror.getField(memberName).then((result) {
- _serialize(memberName, result.reflectee, printer);
- });
+ var result = deprecatedFutureValue(mirror.getField(memberName));
+ _serialize(memberName, result.reflectee, printer);
}
printer.endObject();
}
@@ -185,7 +185,7 @@ class JsonPrinter {
} else {
// Convenient hack to remove the pretty printing this serializer adds by
// default.
- return JSON.stringify(JSON.parse(_sb.toString()));
+ return json.stringify(json.parse(_sb.toString()));
}
}
« no previous file with comments | « sdk/lib/_internal/dartdoc/lib/src/dartdoc/utils.dart ('k') | sdk/lib/_internal/dartdoc/lib/src/markdown/block_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698