Clone this repo:
  1. 4d016bc Prepare to release 2.1.16 (#54) by Kevin Moore · 8 days ago master 2.1.16
  2. a0ecc98 Revert "Improve the YamlScalar.span values with trailing whitespace" by Kevin Moore · 3 months ago
  3. aa6b82c Improve the YamlScalar.span values with trailing whitespace by Kevin Moore · 3 months ago
  4. f532626 Add test to validate SourceSpan values for nodes by Kevin Moore · 3 months ago
  5. 643d0d2 Update .gitignore to new `dart_tool` pub cache (#44) by BC Ko · 3 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));
}