commit | 54e8284b38436a23256fe8f251d04bebfe554054 | [log] [tgz] |
---|---|---|
author | Jonas Finnemann Jensen <jonasfj@google.com> | Thu May 04 14:33:11 2023 +0200 |
committer | GitHub <noreply@github.com> | Thu May 04 14:33:11 2023 +0200 |
tree | b46c48cc82558e81878074bde6867d865af177f8 | |
parent | 56dfaf4fb021ac1c0f1a469e7c8e71ea4f7add2f [diff] |
Prepare release with topics (#144)
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)); }