commit | 32c70a148842157805ca5c1592bdb95670a9aac1 | [log] [tgz] |
---|---|---|
author | Lasse R.H. Nielsen <lrn@google.com> | Tue May 15 22:34:10 2018 +0200 |
committer | Kevin Moore <kevmoo@users.noreply.github.com> | Tue May 15 13:34:10 2018 -0700 |
tree | 405a28ef7233d754aa90cc711676fbeb5dbda6e9 | |
parent | 58872af14996830b1d97fc1f4cb6443410c5225c [diff] |
Remove upper case constants (#39)
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)); }