Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dart-lang/yaml
A Dart YAML parser.
https://github.com/dart-lang/yaml
Last synced: 1 day ago
JSON representation
A Dart YAML parser.
- Host: GitHub
- URL: https://github.com/dart-lang/yaml
- Owner: dart-lang
- License: mit
- Created: 2014-12-18T00:57:45.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2024-10-28T21:51:07.000Z (about 2 months ago)
- Last Synced: 2024-10-29T15:47:04.409Z (about 2 months ago)
- Language: Dart
- Homepage: https://pub.dev/packages/yaml
- Size: 321 KB
- Stars: 169
- Watchers: 42
- Forks: 58
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-dart - yaml - A Dart YAML parser. [<img src="https://travis-ci.org/dart-lang/yaml.svg?branch=master">](https://travis-ci.org/dart-lang/yaml) (Libraries / Parsers)
README
[![Build Status](https://github.com/dart-lang/yaml/workflows/Dart%20CI/badge.svg)](https://github.com/dart-lang/yaml/actions?query=workflow%3A"Dart+CI"+branch%3Amaster)
[![Pub Package](https://img.shields.io/pub/v/yaml.svg)](https://pub.dev/packages/yaml)
[![package publisher](https://img.shields.io/pub/publisher/yaml.svg)](https://pub.dev/packages/yaml/publisher)A parser for [YAML](https://yaml.org/).
## Usage
Use `loadYaml` to load a single document, or `loadYamlStream` to load a
stream of documents. For example:```dart
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:```dart
import 'dart:convert';
import 'package:yaml/yaml.dart';main() {
var doc = loadYaml("YAML: YAML Ain't Markup Language");
print(json.encode(doc));
}
```