commit | 88ad46edc739de6591b13eae4acedc277ed0d703 | [log] [tgz] |
---|---|---|
author | jmesserly@google.com <jmesserly@google.com> | Wed Nov 06 03:27:58 2013 +0000 |
committer | jmesserly@google.com <jmesserly@google.com> | Wed Nov 06 03:27:58 2013 +0000 |
tree | 9525155b79224276b3f28a113d531b542b08fc3f | |
parent | 7acf30ab4bac7344542f0dac72bf07235ad995e7 [diff] |
add versions and constraints for packages and samples - all packages at 0.9.0, except "analyzer" which had a version already - dependencies at ">=0.9.0 <0.10.0" except analyzer is ">=0.10.0 <0.11.0" - sdk constraint ">=1.0.0 <2.0.0" R=sigmund@google.com Review URL: https://codereview.chromium.org//59763006 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart/pkg/yaml@29957 260f80e4-7a28-3924-810f-c04153c831b5
A parser for YAML.
Use loadYaml
to load a single document, or loadYamlStream
to load a stream of documents. For example:
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:
import 'dart:convert'; import 'package:yaml/yaml.dart'; main() { var doc = loadYaml("YAML: YAML Ain't Markup Language"); print(JSON.encode(doc)); }
The source code for this package is at http://code.google.com/p/dart. Please file issues at http://dartbug.com. Other questions or comments can be directed to the Dart mailing list at mailto:misc@dartlang.org.