commit | 8b68d3c1a7e69601f65e8378f6a4773a7e32c870 | [log] [tgz] |
---|---|---|
author | pq <pquitslund@gmail.com> | Fri Nov 06 22:12:40 2020 -0800 |
committer | pq <pquitslund@gmail.com> | Fri Nov 06 22:12:40 2020 -0800 |
tree | 89ab9e24d4d4d3e57f6f371fc335c678f1ed0d95 | |
parent | 0078ffe926bacc874bcfb920d9be8c40cbc4b085 [diff] |
updated charcode dep
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)); }