commit | b4c4411631bda556ce9a45af1ab0eecaf9f3ac53 | [log] [tgz] |
---|---|---|
author | Jacob MacDonald <jakemac@google.com> | Thu Feb 25 08:17:46 2021 -0800 |
committer | GitHub <noreply@github.com> | Thu Feb 25 08:17:46 2021 -0800 |
tree | 7e5317516ec21ca848b2a72b423575fab05decd0 | |
parent | 62fc538dc331d3d177fca4ddeb48782c62c42080 [diff] |
prep to release 3.1.0 (#110)
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)); }