JsonStringSerializer

Serializer for a range based plain JSON string representation.

struct JsonStringSerializer (
R
bool pretty = false
) if (
isInputRange!R ||
isOutputRange!(R, char)
) {}

Constructors

this
this(R range)
Undocumented in source.

Postblit

this(this)
this(this)
Undocumented in source.

Members

Functions

beginReadArrayEntry
void beginReadArrayEntry(size_t index)
Undocumented in source. Be warned that the author may not have intended to support it.
beginReadDictionaryEntry
void beginReadDictionaryEntry(string name)
Undocumented in source. Be warned that the author may not have intended to support it.
beginWriteArray
void beginWriteArray(size_t )
Undocumented in source. Be warned that the author may not have intended to support it.
beginWriteArrayEntry
void beginWriteArrayEntry(size_t )
Undocumented in source. Be warned that the author may not have intended to support it.
beginWriteDictionary
void beginWriteDictionary()
Undocumented in source. Be warned that the author may not have intended to support it.
beginWriteDictionaryEntry
void beginWriteDictionaryEntry(string name)
Undocumented in source. Be warned that the author may not have intended to support it.
endReadArrayEntry
void endReadArrayEntry(size_t index)
Undocumented in source. Be warned that the author may not have intended to support it.
endReadDictionaryEntry
void endReadDictionaryEntry(string name)
Undocumented in source. Be warned that the author may not have intended to support it.
endWriteArray
void endWriteArray()
Undocumented in source. Be warned that the author may not have intended to support it.
endWriteArrayEntry
void endWriteArrayEntry(size_t )
Undocumented in source. Be warned that the author may not have intended to support it.
endWriteDictionary
void endWriteDictionary()
Undocumented in source. Be warned that the author may not have intended to support it.
endWriteDictionaryEntry
void endWriteDictionaryEntry(string name)
Undocumented in source. Be warned that the author may not have intended to support it.
getSerializedResult
void getSerializedResult()
Undocumented in source. Be warned that the author may not have intended to support it.
readArray
void readArray(void delegate(size_t) @(safe) size_callback, void delegate() @(safe) entry_callback)
Undocumented in source. Be warned that the author may not have intended to support it.
readDictionary
void readDictionary(void delegate(string) @(safe) entry_callback)
Undocumented in source. Be warned that the author may not have intended to support it.
readValue
T readValue()
Undocumented in source. Be warned that the author may not have intended to support it.
skipValue
void skipValue()
Undocumented in source. Be warned that the author may not have intended to support it.
tryReadNull
bool tryReadNull()
Undocumented in source. Be warned that the author may not have intended to support it.
writeStringSinkValue
void writeStringSinkValue(T value)
Undocumented in source. Be warned that the author may not have intended to support it.
writeValue
void writeValue(T value)
Undocumented in source. Be warned that the author may not have intended to support it.

Templates

isJsonBasicType
template isJsonBasicType(T)
Undocumented in source.
isSupportedValueType
template isSupportedValueType(T)
Undocumented in source.

Examples

Cloning JSON arrays

Json value = Json([ Json([ Json.emptyArray ]), Json.emptyArray ]).clone;

assert(value.length == 2);
assert(value[0].length == 1);
assert(value[0][0].length == 0);

See Also

vibe.data.serialization.serialize, vibe.data.serialization.deserialize, serializeToJson, deserializeJson

Meta