commit | 7937da1cac3c8ffa228b4e6658c7af9f2e216a08 | [log] [tgz] |
---|---|---|
author | Kevin Moore <kevmoo@google.com> | Tue Apr 09 12:54:15 2019 -0700 |
committer | Kevin Moore <kevmoo@users.noreply.github.com> | Tue Apr 09 13:15:45 2019 -0700 |
tree | 945b150290edcf16c466fed7a7ad4df93ed4431f | |
parent | a19ba89c8893d0ae72628f6d8b85873e3c6b0918 [diff] |
Enable and fix a number of lints
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)); }