commit | 804fec90e8240affc116b4f6a3324b8ee261ee2c | [log] [tgz] |
---|---|---|
author | Konstantin Shcheglov <scheglov@google.com> | Wed Sep 01 08:22:05 2021 -0700 |
committer | Konstantin Shcheglov <scheglov@google.com> | Wed Sep 01 08:22:05 2021 -0700 |
tree | a05761a7a92d88d71348b13917b65af3c97843f0 | |
parent | fdfb733fdd08760984d6a2ca6e3d3bf21490cf73 [diff] |
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)); }