reference

This documentation is automatically generated from the openFrameworks source code using doxygen and refers to the most recent release, version 0.12.0.

ofJson.h File Reference
#include "json.hpp"
#include "ofParameter.h"

Go to the source code of this file.

Typedefs

using ofJson = nlohmann::json
 

Functions

ofJson ofLoadJson (const of::filesystem::path &filename)
 Load Json from the given path.
 
bool ofSaveJson (const of::filesystem::path &filename, const ofJson &json)
 Save minified Json to the given path.
 
bool ofSavePrettyJson (const of::filesystem::path &filename, const ofJson &json)
 Save "pretty" indented Json to the given path.
 
void ofSerialize (ofJson &js, const ofAbstractParameter &parameter)
 
void ofDeserialize (const ofJson &json, ofAbstractParameter &parameter)
 

Typedef Documentation

◆ ofJson

using ofJson = nlohmann::json

Function Documentation

◆ ofDeserialize()

void ofDeserialize ( const ofJson json,
ofAbstractParameter parameter 
)
inline

◆ ofLoadJson()

ofJson ofLoadJson ( const of::filesystem::path &  filename)
inline

Load Json from the given path.

Parameters
filenameThe file to load from.
Returns
loaded json, or an empty json object on failure.

◆ ofSaveJson()

bool ofSaveJson ( const of::filesystem::path &  filename,
const ofJson json 
)
inline

Save minified Json to the given path.

Parameters
filenameThe destination path.
jsonThe Json to save.
Returns
true if the json was saved successfully.

◆ ofSavePrettyJson()

bool ofSavePrettyJson ( const of::filesystem::path &  filename,
const ofJson json 
)
inline

Save "pretty" indented Json to the given path.

Parameters
filenameThe destination path.
jsonThe Json to save.
Returns
true if the json was saved successfully.

◆ ofSerialize()

void ofSerialize ( ofJson js,
const ofAbstractParameter parameter 
)
inline