Description

YAML serialization library for dyaml. Easily serialize/deserialize structs to/from YAML.

Package Information

Version0.2.0 (2016-Dec-10)
Repository https://github.com/forbjok/yamlserialized
LicenseMIT
CopyrightCopyright © 2016, Kjartan F. Kvamme
AuthorsKjartan F. Kvamme
Registered byKjartan F. Kvamme
Dependencies

dyaml-yamlserialized

dunit

Installation

To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl

Readme

Build Status

YAML serialization library for D:YAML. Easily serialize/deserialize structs and classes to/from YAML nodes.

How to use

import yamlserialized : deserializeInto, toYAMLNode;

struct MyStruct {
	int intField;
	string stringField;
}

MyStruct st;

st.intField = 42;
st.stringField = "Don't panic.";

// Serialize the struct to a D:YAML Node
auto node = st.toYAMLNode();

// Create a new empty struct
MyStruct st2;

// Deserialize the node into it
node.deserializeInto(st2);

Available versions

0.2.0 0.1.1 0.1.0 ~master