mir-yaml ~master

YAML parser and emitter with Mir serialisation engine support


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

NOTE: Mir's YAML was moved to https://github.com/libmir/mir-ion

mir-yaml - Mir Fork

Build Status Circle CI codecov code.dlang.org

Introduction

mir-yaml is an open source YAML parser and emitter library for the D programming language. It is almost compliant to the YAML 1.1 specification. mir-yaml is based on PyYAML created by Kirill Simonov.

mir-yaml is designed to be easy to use while supporting the full feature set of YAML. To start using it in your project, see the Getting Started tutorial.

Mir specific Features

  • Integration with Mir serialisation engine. See also the example.
  • Precise number printing (Ryu) and parsing (required by YAML spec).
  • Support for Arbitrary timestamp precision (required by YAML spec).
  • Support for Timestamp (Mir), YearMonthDay (Mir), Date (Mir and Phobos), DateTime, SysTime.
  • YamlAlgebraic is full featured Mir Algebraic.

Features

  • Easy to use, high level API and detailed debugging messages.
  • Detailed API documentation and tutorials.
  • Code examples.
  • Supports all YAML 1.1 constructs. All examples from the YAML 1.1 specification are parsed correctly.
  • Reads from and writes from/to YAML files or in-memory buffers.
  • UTF-8, UTF-16 and UTF-32 encodings are supported, both big and little endian (plain ASCII also works as it is a subset of UTF-8).
  • Support for both block (Python-like, based on indentation) and flow (JSON-like, based on bracing) constructs.
  • Support for YAML anchors and aliases.
  • Support for default values in mappings.
  • Support for custom tags (data types), and implicit tag resolution for custom scalar tags.
  • All tags (data types) described at http://yaml.org/type/ are supported, with the exception of tag:yaml.org,2002:yaml, which is used to represent YAML code in YAML.
  • Remembers YAML style information between loading and dumping if possible.
  • Reuses input memory and uses slices to minimize memory allocations.
  • There is no support for recursive data structures. There are no plans to implement this at the moment.

Directory structure

DirectoryContents
./This README, utility scripts.
./docsDocumentation.
./sourceSource code.
./examples/Example projects using mir-yaml.
./testUnittest data.

Installing and tutorial

See the Getting Started. Tutorial and other tutorials that can be found in the in the docs directory.

API documentation is available here.

Credits

mir-yaml was created by Ferdinand Majerech aka Kiith-Sa and is handled by the dlang-community organization since 2017, and libmir organization since 2021. Parts of code based on PyYAML created by Kirill Simonov.

Authors:
  • Ferdinand Majerech
  • Cameron "Herringway" Ross
  • Ilya Yaroshenko
Dependencies:
mir-algorithm
Versions:
1.0.0 2021-Jul-06
~master 2022-Oct-12
~fix-ci 2022-Feb-22
Show all 3 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 59291 downloads total

Score:
0.6
Short URL:
mir-yaml.dub.pm