commit | 2392d113b0104dd19358f2833a282f19e2d67c01 | [log] [tgz] |
---|---|---|
author | Jacob MacDonald <jakemac@google.com> | Fri Feb 05 11:06:51 2021 -0800 |
committer | GitHub <noreply@github.com> | Fri Feb 05 11:06:51 2021 -0800 |
tree | 251db080fd7c53d04defd1cca60ed4f1444e1519 | |
parent | da4c4d80063627a75db25645cd056caf8f42ab09 [diff] |
stable null safety release (#106)
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)); }