Clone this repo:
  1. 1eeed09 Reject duplicate keys. (#22) by Natalie Weizenbaum · 5 months ago master 2.1.12
  2. eca8938 Merge pull request #19 from denesalmasi/yaml by Natalie Weizenbaum · 6 months ago 2.1.11
  3. fe1d770 Add pubspec and changelog entries. by Natalie Weizenbaum · 6 months ago
  4. 13c849b Include a pull request reference. by Natalie Weizenbaum · 6 months ago
  5. 1da95e4 Do not try to fetch more tokens if the stream end is encountered. by Dénes Almási · 6 months ago

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