yaml_codec 1.0.0 copy "yaml_codec: ^1.0.0" to clipboard
yaml_codec: ^1.0.0 copied to clipboard

Encoder and decoder for converting YAML object representation.

YAML Codec #

pub package

Encoder and decoder for converting YAML object representation.
Inspired by dart:convert's json/jsonEncode/jsonDecode. Backed by yaml and yaml_writer.

Features #

  • yaml / yamlDecode / yamlEncode
  • YamlCodec / YamlEncoder / YamlDecoder

Usage #

import 'package:yaml_codec/yaml_codec.dart';

void main() {
  var map = {
    'name': 'Joe',
    'ids': [10, 20, 30],
    'desc': 'This is\na multiline\ntext',
    'enabled': true,
  };

  var yamlText = yamlEncode(map);
  print(yamlText);

  var yamlMap = yamlDecode(yamlText);
  print(yamlMap);
}

Support #

Buy Me A Coffee

3
likes
160
points
1.08k
downloads

Publisher

verified publishermichaeldark.dev

Weekly Downloads

Encoder and decoder for converting YAML object representation.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

yaml, yaml_writer

More

Packages that depend on yaml_codec