Skip to content

MTY_JSONWriteFile

chrisd1100 edited this page Aug 25, 2022 · 2 revisions

Serialize an MTY_JSON item and write it to a file.

This function "pretty prints" the JSON, adding spaces, newlines, and tabs where appropriate.

bool MTY_JSONWriteFile(
    const char *     path,
    const MTY_JSON * json
);

Parameters

path (const char *)

Path to a file where the serialized output will be written.

json (const MTY_JSON *)

An MTY_JSON item to serialize.

Return value

bool

Returns true on success, false on failure. Call MTY_GetLog for details.

Platform support

Windows   macOS   Android   Linux   Web  

See also

Module: JSON

Clone this wiki locally