Clone this repo:
  1. a0ecc98 Revert "Improve the YamlScalar.span values with trailing whitespace" by Kevin Moore · 2 weeks ago master
  2. aa6b82c Improve the YamlScalar.span values with trailing whitespace by Kevin Moore · 2 weeks ago
  3. f532626 Add test to validate SourceSpan values for nodes by Kevin Moore · 2 weeks ago
  4. 643d0d2 Update .gitignore to new `dart_tool` pub cache (#44) by BC Ko · 2 weeks ago
  5. 032d51f Replace deprecated JSON with json from dart:convert (#48) by scarger · 2 weeks ago

A parser for YAML.

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