commit | b3d299eee5e68135c46d913d3e5b637daad27c85 | [log] [tgz] |
---|---|---|
author | Kevin Moore <kevmoo@users.noreply.github.com> | Wed Aug 28 17:44:57 2024 -0700 |
committer | GitHub <noreply@github.com> | Wed Aug 28 17:44:57 2024 -0700 |
tree | 003c6aa1cb227b9b8c696446d48d414c7121151c | |
parent | a645c3905fc3cc2bbd3def9879ba8dedd26e3aa5 [diff] |
Drop Pair util class (#169)
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)); }