commit | 643d0d2cad54397ce89ddaa32c5b8b3161962818 | [log] [tgz] |
---|---|---|
author | BC Ko <bcko@users.noreply.github.com> | Tue Apr 09 14:27:52 2019 -0700 |
committer | Kevin Moore <kevmoo@users.noreply.github.com> | Tue Apr 09 14:27:52 2019 -0700 |
tree | b69f473b8f3f9fcae6b05bd890ace5866df401f2 | |
parent | 032d51f605c6f3c55bed7039c855f4aeea9f7eae [diff] |
Update .gitignore to new `dart_tool` pub cache (#44) dart-lang/sdk#32030
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)); }