saveJSONObject()
Output / FilesDescription
Saves a JSONValue to a file as formatted JSON.
Syntax
bool saveJSONObject(std::string path, JSONValue v, int indent)
Parameters
| Name | Type | Description |
|---|---|---|
| path | std::string | path to write to |
| v | JSONValue | the JSON value |
| indent | int | indentation spaces (default 2) |
Returns
boolRelated
Under the Hood
From Processing.h:
static bool saveJSONObject(const std::string& path, const JSONValue& v, int indent=2);
Under the Hood
From Processing.cpp:
bool PApplet::saveJSONObject(const std::string& path,const JSONValue& v,int indent){
std::ofstream f(path); if(!f)return false; f<<toJSONString(v,indent); return true;
}
return saveJSONObject(path,v,indent);