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

Unified Diff: packages/yaml/README.md

Issue 1400473008: Roll Observatory packages and add a roll script (Closed) Base URL: git@github.com:dart-lang/observatory_pub_packages.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 | « packages/yaml/LICENSE ('k') | packages/yaml/benchmark/benchmark.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/yaml/README.md
diff --git a/packages/yaml/README.md b/packages/yaml/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..c78dc97d7f5aa0b2fa1abfa3805a9677e6be08b6
--- /dev/null
+++ b/packages/yaml/README.md
@@ -0,0 +1,26 @@
+A parser for [YAML](http://www.yaml.org/).
+
+Use `loadYaml` to load a single document, or `loadYamlStream` to load a
+stream of documents. For example:
+
+```dart
+import 'package:yaml/yaml.dart';
+
+main() {
+ var doc = loadYaml("YAML: YAML Ain't Markup Language");
+ print(doc['YAML']);
+}
+```
+
+This library currently doesn't support dumping to YAML. You should use
+`JSON.encode` from `dart:convert` instead:
+
+```dart
+import 'dart:convert';
+import 'package:yaml/yaml.dart';
+
+main() {
+ var doc = loadYaml("YAML: YAML Ain't Markup Language");
+ print(JSON.encode(doc));
+}
+```
« no previous file with comments | « packages/yaml/LICENSE ('k') | packages/yaml/benchmark/benchmark.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698