Skip to content

Latest commit

 

History

History
45 lines (32 loc) · 1.13 KB

README.md

File metadata and controls

45 lines (32 loc) · 1.13 KB

JSONToolkit plugin

UG4-Plugin implementing an interface for JSON

Copyright 2024 Goethe University Frankfurt

Install

Please install/clone this repository through UG4's package managerughub.

cmake -DJSONToolkit=ON ..

Functionality

This plugin provides: a) a class JSON representing 'nlohmann::json' and functions

void JSON_parse(nlohmann::json& j, std::string s);
bool JSON_load_from_file(nlohmann::json& j, std::string filename);
std::string JSON_dump(const nlohmann::json& j);

Outdated is:

SmartPtr<void> JSON_create_object(const nlohmann::json& j);

which should be replaced by JSON_create_XYT or jXYZ in the registry.

b) a class JSONSchemaValidator for validating JSON:

JSONSchemaValidator::JSONSchemaValidator();
void JSONSchemaValidator::init(nlohmann::json& schema);
bool JSONSchemaValidator::validate_document(nlohmann::json& document);

Dependency

License

TBD