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

Side by Side Diff: README.md

Issue 852003003: yaml: reformat, fix README and homepage link, bump version (Closed) Base URL: https://github.com/dart-lang/yaml.git@master
Patch Set: tweak Created 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | codereview.settings » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 A parser for [YAML](http://www.yaml.org/). 1 A parser for [YAML](http://www.yaml.org/).
2 2
3 Use `loadYaml` to load a single document, or `loadYamlStream` to load a 3 Use `loadYaml` to load a single document, or `loadYamlStream` to load a
4 stream of documents. For example: 4 stream of documents. For example:
5 5
6 ```dart 6 ```dart
7 import 'package:yaml/yaml.dart'; 7 import 'package:yaml/yaml.dart';
8 8
9 main() { 9 main() {
10 var doc = loadYaml("YAML: YAML Ain't Markup Language"); 10 var doc = loadYaml("YAML: YAML Ain't Markup Language");
11 print(doc['YAML']); 11 print(doc['YAML']);
12 } 12 }
13 ``` 13 ```
14 14
15 This library currently doesn't support dumping to YAML. You should use 15 This library currently doesn't support dumping to YAML. You should use
16 `JSON.encode` from `dart:convert` instead: 16 `JSON.encode` from `dart:convert` instead:
17 17
18 ```dart 18 ```dart
19 import 'dart:convert'; 19 import 'dart:convert';
20 import 'package:yaml/yaml.dart'; 20 import 'package:yaml/yaml.dart';
21 21
22 main() { 22 main() {
23 var doc = loadYaml("YAML: YAML Ain't Markup Language"); 23 var doc = loadYaml("YAML: YAML Ain't Markup Language");
24 print(JSON.encode(doc)); 24 print(JSON.encode(doc));
25 } 25 }
26 ``` 26 ```
27
28 The source code for this package is at <http://code.google.com/p/dart>.
29 Please file issues at <http://dartbug.com>. Other questions or comments can be
30 directed to the Dart mailing list at <mailto:misc@dartlang.org>.
OLDNEW
« no previous file with comments | « no previous file | codereview.settings » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698