UG4-Plugin implementing an interface for JSON
Copyright 2024 Goethe University Frankfurt
Please install/clone this repository through UG4's package managerughub.
cmake -DJSONToolkit=ON ..
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);
- nlohmann is included as a submodule.
- json-schema-validator is included as a submodule.
TBD