commit | 2af44871f684c89e973a96e39026b8b88dda1987 | [log] [tgz] |
---|---|---|
author | Konstantin Scheglov <scheglov@google.com> | Thu Sep 02 09:40:34 2021 -0600 |
committer | GitHub <noreply@github.com> | Thu Sep 02 09:40:34 2021 -0600 |
tree | a05761a7a92d88d71348b13917b65af3c97843f0 | |
parent | fdfb733fdd08760984d6a2ca6e3d3bf21490cf73 [diff] | |
parent | 804fec90e8240affc116b4f6a3324b8ee261ee2c [diff] |
Merge pull request #115 from scheglov/aa-fix-HintCode.UNNECESSARY_TYPE_CHECK_TRUE Fix pre-existing HintCode.UNNECESSARY_TYPE_CHECK_TRUE
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)); }