Skip to content

cf_json_to_file

Category: json
GitHub: cute_json.h


Saves the json document to a file.

CF_Result cf_json_to_file(CF_JDoc doc, const char* virtual_path);
Parameters Description
doc The json document to save.
virtual_path A virtual path to the json file. Make sure to setup your write directory with cf_fs_set_write_directory. See Virtual File System.

Remarks

If you want to remove all unnecessary formatting/whitespace then use cf_json_to_file_minimal.

CF_JDoc
cf_make_json
cf_make_json_from_file
cf_json_get_root
cf_destroy_json
cf_json_get_root
cf_json_to_string
cf_json_to_file_minimal
cf_json_to_string_minimal