Skip to content

funatsufumiya/ofxAnyJson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ofxAnyJson

Loads any json-like formats as ofJson.

  • yaml
  • hjson
  • toml

(inspired by any-json)

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)

About

Any json-like formats into ofJson

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published