jsonizer.tojson

Contains functions for serializing JSON data.

Members

Aliases

PrettyJson
alias PrettyJson = Flag!"PrettyJson"

Whether to nicely format json string.

Functions

toJSON
JSONValue toJSON(T val)

convert a bool to a JSONValue

toJSON
JSONValue toJSON(T val)

convert a string to a JSONValue

toJSON
JSONValue toJSON(T val)

convert a floating point value to a JSONValue

toJSON
JSONValue toJSON(T val)

convert a signed integer to a JSONValue

toJSON
JSONValue toJSON(T val)

convert an unsigned integer to a JSONValue

toJSON
JSONValue toJSON(T val)

convert an enum name to a JSONValue

toJSON
JSONValue toJSON(T args)

convert a homogenous array into a JSONValue array

toJSON
JSONValue toJSON(T args)

convert a set of heterogenous values into a JSONValue array

toJSON
JSONValue toJSON(T map)

convert a associative array into a JSONValue object

toJSON
JSONValue toJSON(T obj)

Convert a user-defined type to json. See jsonizer.jsonize for info on how to mark your own types for serialization.

toJSONString
string toJSONString(T obj, PrettyJson pretty)

Convert an instance of some type T directly into a json-formatted string.

writeJSON
void writeJSON(string path, T obj)

Write a jsonizeable object to a file.

Meta

Authors

<a href="https://github.com/rcorre">rcorre</a> * License: <a href="http://opensource.org/licenses/MIT">MIT</a> * Copyright: Copyright © 2015, rcorre

Date

Date: 3/23/15