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(JSONValue val)

convert a JSONValue to a JSONValue (identity)

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 = PrettyJson.yes)

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

Date

Date: 3/23/15