commit | ad0779d1baa25c6b10a192d080efc45de02b6a32 | [log] [tgz] |
---|---|---|
author | Jonas Finnemann Jensen <jonasfj@google.com> | Fri Sep 24 10:06:26 2021 +0200 |
committer | GitHub <noreply@github.com> | Fri Sep 24 10:06:26 2021 +0200 |
tree | d803b12364119bc71d560bebe3eb099b867e3cb4 | |
parent | 2af44871f684c89e973a96e39026b8b88dda1987 [diff] | |
parent | 3bb811f8728348f604a5957d69c68fc00b46f827 [diff] |
Merge pull request #118 from jonasfj/cleanup-license Simplify licensing
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)); }