commit | 509fd72c0910746bf25db9c7d890b4c47c286a8c | [log] [tgz] |
---|---|---|
author | Kevin Moore <kevmoo@users.noreply.github.com> | Mon Dec 11 16:37:13 2023 -0800 |
committer | GitHub <noreply@github.com> | Mon Dec 11 16:37:13 2023 -0800 |
tree | 0bc98f55e81ec5104d32ff083d711baf252231d2 | |
parent | 98a3aab54b09d355e094fdb4e5abd9083a2876b8 [diff] |
update lints, require Dart 3.0 (#156) * switch expressions * dry up logic
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)); }