tree: 2223a9fc1332b9306501b4d1778de1afab841fc6 [path history] [tgz]
  1. benchmark/
  2. example/
  3. lib/
  4. analysis_options.yaml
  5. BUILD.gn
  6. CHANGELOG.md
  7. LICENSE
  8. pubspec.yaml
  9. README.md
yaml/README.md

Build Status Pub Package package publisher

A parser for YAML.

Usage

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