Skip to content

JSON serialization library for std_data_json. Easily serialize/deserialize structs and classes to/from a JSONValue.

License

Notifications You must be signed in to change notification settings

JesseKPhillips/jsonserialized

 
 

Repository files navigation

jsonserialized Build Status

JSON serialization library for std_data_json. Easily serialize/deserialize structs and classes to/from a JSONValue.

How to use

import jsonserialized.serialization;
import jsonserialized.deserialization;
import stdx.data.json;

struct MyStruct {
    int intField;
    string stringField;
}

MyStruct st;

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

// Serialize the struct to JSON
auto jsonValue = st.serializeToJSONValue();

// Create a new empty struct
MyStruct st2;

// Deserialize the JSONValue into it
st2.deserializeFromJSONValue(jsonValue);

About

JSON serialization library for std_data_json. Easily serialize/deserialize structs and classes to/from a JSONValue.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • D 100.0%