Any json-like formats into ofJson
README
ofxAnyJson
Loads any json-like formats as
ofJson.- yaml
- hjson
- toml
Dependency
ofxJsonUtils
Usage
#include "ofxAnyJson.h"
//--------------------------------------------------------------
void ofApp::setup(){
ofJson json = ofxAnyJson::loadJson(ofToDataPath("test.json"));
ofJson yaml = ofxAnyJson::loadYaml(ofToDataPath("test.yaml"));
ofJson hjson = ofxAnyJson::loadHjson(ofToDataPath("test.hjson"));
ofJson toml = ofxAnyJson::loadToml(ofToDataPath("test.toml"));
ofLog() << "json: " << json;
ofLog() << "yaml: " << yaml;
ofLog() << "hjson: " << hjson;
ofLog() << "toml: " << toml;
}TODOs
- Implement save functions
- Support other formats (json5, cson)
ofxAddons