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

Unified Diff: README.md

Issue 1411523003: add a JsonInfoCodec class (Closed) Base URL: git@github.com:dart-lang/dart2js_info.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « CHANGELOG.md ('k') | bin/code_deps.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: README.md
diff --git a/README.md b/README.md
index c5d01bf4d8f287d41c921528cdc89ae75b1c57e5..b2f53b740a757fc3765fec344deda594389686b9 100644
--- a/README.md
+++ b/README.md
@@ -37,8 +37,9 @@ of this package and update when needed.
## Info API
-[AllInfo][AllInfo] exposes a Dart representation of the `.info.json` files.
-You can parse the information using `AllInfo.fromJson`. For example:
+[AllInfo][AllInfo] exposes a Dart representation of all of the collected
+information. You can decode an `AllInfo` object from the JSON form produced by
+the `dart2js` `--dump-info` option using the `AllInfoJsonCodec`. For example:
```dart
import 'dart:convert';
@@ -49,7 +50,7 @@ import 'package:dart2js_info/info.dart';
main(args) {
var infoPath = args[0];
var json = JSON.decode(new File(infoPath).readAsStringSync());
- var info = new AllInfo.fromJson(json);
+ var info = new AllInfoJsonCodec().decode(json);
...
}
```
« no previous file with comments | « CHANGELOG.md ('k') | bin/code_deps.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698