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

Side by Side Diff: pkg/yaml/README.md

Issue 274953002: Bring the YAML package's style up to modern standards. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/yaml/lib/src/composer.dart » ('j') | pkg/yaml/lib/src/composer.dart » ('J')
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 import 'package:yaml/yaml.dart'; 6 ```dart
7 main() { 7 import 'package:yaml/yaml.dart';
8 var doc = loadYaml("YAML: YAML Ain't Markup Language"); 8
9 print(doc['YAML']); 9 main() {
10 } 10 var doc = loadYaml("YAML: YAML Ain't Markup Language");
11 print(doc['YAML']);
12 }
13 ```
11 14
12 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
13 `JSON.encode` from `dart:convert` instead: 16 `JSON.encode` from `dart:convert` instead:
14 17
15 import 'dart:convert'; 18 ```dart
16 import 'package:yaml/yaml.dart'; 19 import 'dart:convert';
17 main() { 20 import 'package:yaml/yaml.dart';
18 var doc = loadYaml("YAML: YAML Ain't Markup Language"); 21
19 print(JSON.encode(doc)); 22 main() {
20 } 23 var doc = loadYaml("YAML: YAML Ain't Markup Language");
24 print(JSON.encode(doc));
25 }
26 ```
21 27
22 The source code for this package is at <http://code.google.com/p/dart>. 28 The source code for this package is at <http://code.google.com/p/dart>.
23 Please file issues at <http://dartbug.com>. Other questions or comments can be 29 Please file issues at <http://dartbug.com>. Other questions or comments can be
24 directed to the Dart mailing list at <mailto:misc@dartlang.org>. 30 directed to the Dart mailing list at <mailto:misc@dartlang.org>.
OLDNEW
« no previous file with comments | « no previous file | pkg/yaml/lib/src/composer.dart » ('j') | pkg/yaml/lib/src/composer.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698