commit | aa6b82cb13ade03f55e06b9fbe47f11a0ec92102 | [log] [tgz] |
---|---|---|
author | Kevin Moore <kevmoo@google.com> | Tue Apr 09 14:26:22 2019 -0700 |
committer | Kevin Moore <kevmoo@users.noreply.github.com> | Tue Apr 09 15:17:13 2019 -0700 |
tree | e89e1d4470e26709b70c973b82e0d5c708d0b8b7 | |
parent | f5326262aef05055b1b976f852e8e4a3a0db8c0a [diff] |
Improve the YamlScalar.span values with trailing whitespace Fixes https://github.com/dart-lang/yaml/issues/51 Also remove dead line from changelog
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)); }