mir-yaml 1.0.0
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:
D:YAML - Mir Fork
Introduction
D: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. D:YAML is based on PyYAML created by Kirill Simonov.
D: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
. Node.mapping
andNode.sequence
are full featured Mir slices.
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
Directory | Contents |
---|---|
./ | This README, utility scripts. |
./docs | Documentation. |
./source | Source code. |
./examples/ | Example projects using D:YAML. |
./test | Unittest 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
D: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.
- 1.0.0 released 3 years ago
- libmir/mir-yaml
- github.com/dlang-community/D-YAML
- BSL-1.0
- Copyright © 2011-2018, Ferdinand Majerech
- Authors:
- Dependencies:
- tinyendian, mir-algorithm
- Versions:
-
1.0.0 2021-Jul-06 ~master 2022-Oct-12 ~fix-ci 2022-Feb-22 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
59291 downloads total
-
- Score:
- 0.7
- Short URL:
- mir-yaml.dub.pm