commit | 032d51f605c6f3c55bed7039c855f4aeea9f7eae | [log] [tgz] |
---|---|---|
author | scarger <supremeterminal@gmail.com> | Tue Apr 09 17:27:18 2019 -0400 |
committer | Kevin Moore <kevmoo@users.noreply.github.com> | Tue Apr 09 14:27:18 2019 -0700 |
tree | 4aac67ee4798b3d05e2614a965e02c6cbb8482a0 | |
parent | 298bfc0a1ab9d5e0200d40a1cf12f1d16d6bdd39 [diff] |
Replace deprecated JSON with json from dart:convert (#48)
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)); }