commit | a645c3905fc3cc2bbd3def9879ba8dedd26e3aa5 | [log] [tgz] |
---|---|---|
author | Tamcy <tamcy@users.noreply.github.com> | Sun Jul 21 06:19:58 2024 +0800 |
committer | GitHub <noreply@github.com> | Sat Jul 20 15:19:58 2024 -0700 |
tree | d3386dc6c8243009c6b1a73d477bf757ec6a1aea | |
parent | 30fd9e0cd49b2e04f74769f9b24a0300e400403e [diff] |
Handle surrogate pairs during scanning (#159) Change back to readChar() whenever possible; remove the need to decode the surrogate for further checking
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)); }