Save the JSON contents to a file.

Syntax

int json_dump_file(
    const json_t* json,
    const char* path,
    size_t flags
);

Parameters

json
[in] JSON value
path
[in] file path
flags
[in] encoding flag

Return value

Returns 0 on success and -1 on error.

Remarks

Write the JSON representation of json to the file path. If path already exists, it is overwritten. flags is described in other page. Returns 0 on success and -1 on error.

See the API Reference below for more information.

Requirements

Header file:
lib.h : System E6.0 or later.
jansson.h
jansson_config.h
jansson_log.h
Library file:
libJansson.a
libSTARTUPOPH5000.a : System E6.0 or later.

See also

Last updated: 2022/01/26