yaml 2.1.14

  • README.md
  • Installing
  • Versions
  • 48

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

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

2.1.14 #

  • Remove use of deprecated features.
  • Updated SDK version to 2.0.0-dev.17.0

2.1.13 #

  • Stop using comment-based generic syntax.

2.1.12 #

  • Properly refuse mappings with duplicate keys.

2.1.11 #

  • Fix an infinite loop when parsing some invalid documents.

2.1.10 #

  • Support string_scanner 1.0.0.

2.1.9 #

  • Fix all strong-mode warnings.

2.1.8 #

  • Remove the dependency on path, since we don't actually import it.

2.1.7 #

  • Fix more strong mode warnings.

2.1.6 #

  • Fix two analysis issues with DDC's strong mode.

2.1.5 #

  • Fix a bug with 2.1.4 where source span information was being discarded for scalar values.

2.1.4 #

  • Substantially improve performance.

2.1.3 #

  • Add a hint that a colon might be missing when a mapping value is found in the wrong context.

2.1.2 #

  • Fix a crashing bug when parsing block scalars.

2.1.1 #

  • Properly scope SourceSpans for scalar values surrounded by whitespace.

2.1.0 #

  • Rewrite the parser for a 10x speed improvement.

  • Support anchors and aliases (&foo and *foo).

  • Support explicit tags (e.g. !!str). Note that user-defined tags are still not fully supported.

  • %YAML and %TAG directives are now parsed, although again user-defined tags are not fully supported.

  • YamlScalar, YamlList, and YamlMap now expose the styles in which they were written (for example plain vs folded, block vs flow).

  • A yamlWarningCallback field is exposed. This field can be used to customize how YAML warnings are displayed.

2.0.1+1 #

  • Fix an import in a test.

  • Widen the version constraint on the collection package.

2.0.1 #

  • Fix a few lingering references to the old Span class in documentation and tests.

2.0.0 #

  • Switch from source_maps' Span class to source_span's SourceSpan class.

  • For consistency with source_span and string_scanner, all sourceName parameters have been renamed to sourceUrl. They now accept Urls as well as Strings.

1.1.1 #

  • Fix broken type arguments that caused breakage on dart2js.

  • Fix an analyzer warning in yaml_node_wrapper.dart.

1.1.0 #

  • Add new publicly-accessible constructors for YamlNode subclasses. These constructors make it possible to use the same API to access non-YAML data as YAML data.

  • Make YamlException inherit from source_map's [SpanFormatException][]. This improves the error formatting and allows callers access to source range information.

1.0.0+1 #

  • Fix a variable name typo.

1.0.0 #

  • Backwards incompatibility: The data structures returned by loadYaml and loadYamlStream are now immutable.

  • Backwards incompatibility: The interface of the YamlMap class has changed substantially in numerous ways. External users may no longer construct their own instances.

  • Maps and lists returned by loadYaml and loadYamlStream now contain information about their source locations.

  • A new loadYamlNode function returns the source location of top-level scalars as well.

0.10.0 #

  • Improve error messages when a file fails to parse.

0.9.0+2 #

  • Ensure that maps are order-independent when used as map keys.

0.9.0+1 #

  • The YamlMap class is deprecated. In a future version, maps returned by loadYaml and loadYamlStream will be Dart HashMaps with a custom equality operation.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  yaml: ^2.1.14

2. Install it

You can install packages from the command line:

with pub:

$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:yaml/yaml.dart';
Version Uploaded Documentation Archive
2.1.16 Jun 17, 2019 Go to the documentation of yaml 2.1.16 Download yaml 2.1.16 archive
2.1.15 Jul 17, 2018 Go to the documentation of yaml 2.1.15 Download yaml 2.1.15 archive
2.1.14 May 22, 2018 Go to the documentation of yaml 2.1.14 Download yaml 2.1.14 archive
2.1.13 Sep 27, 2017 Go to the documentation of yaml 2.1.13 Download yaml 2.1.13 archive
2.1.12 Oct 13, 2016 Go to the documentation of yaml 2.1.12 Download yaml 2.1.12 archive
2.1.11 Oct 6, 2016 Go to the documentation of yaml 2.1.11 Download yaml 2.1.11 archive
2.1.10 Jun 23, 2016 Go to the documentation of yaml 2.1.10 Download yaml 2.1.10 archive
2.1.9 May 4, 2016 Go to the documentation of yaml 2.1.9 Download yaml 2.1.9 archive
2.1.8 Jan 19, 2016 Go to the documentation of yaml 2.1.8 Download yaml 2.1.8 archive
2.1.7 Oct 2, 2015 Go to the documentation of yaml 2.1.7 Download yaml 2.1.7 archive

All 92 versions...

Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://dart.dev/dart-2#migration.

Maintenance issues and suggestions

Make sure dartdoc successfully runs on your package's source files. (-10 points)

Dependencies were not resolved.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.49.0 <2.0.0