JsonDump(json, int)

From NWN Lexicon
Jump to: navigation, search
Nwnee logo.jpg Note: This article documents Neverwinter Nights: Enhanced Edition new content or changes/updates/fixes to 1.69 functions. These are all listed under the category and patches pages.

Dump the given json value into a string that can be read back in via JsonParse.

string JsonDump(
    json jValue,
    int nIndent = -1
);


Parameters

jValue
The json to dump into a string.
nIndent
describes the indentation level for pretty-printing; the default value of -1 means no indentation and no linebreaks.


Description

Dump the given json value into a string that can be read back in via JsonParse. nIndent describes the indentation level for pretty-printing; a value of -1 means no indentation and no linebreaks. Returns a string describing JSON_TYPE_NULL on error.


Remarks

NB: The dumped string is in game-local encoding, with all non-ascii characters escaped.


Version

This function was added in 1.85.8193.31 of NWN:EE.


Example

Information icon.png This article is in need of examples. You can help the NWN Lexicon by showing how to use this code effectively.

See Also

functions:

JSON Functions