Clone this repo:
  1. 5137026 Preserve parsed key order in maps (#57) by Yegor · 4 weeks ago master 2.2.0
  2. 4d016bc Prepare to release 2.1.16 (#54) by Kevin Moore · 4 months ago 2.1.16
  3. a0ecc98 Revert "Improve the YamlScalar.span values with trailing whitespace" by Kevin Moore · 6 months ago
  4. aa6b82c Improve the YamlScalar.span values with trailing whitespace by Kevin Moore · 6 months ago
  5. f532626 Add test to validate SourceSpan values for nodes by Kevin Moore · 6 months ago

A parser for YAML.

Pub Package Build Status

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));
}