mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-05 19:19:39 -06:00
Add documentation to JSON loading functions
This commit is contained in:
@@ -76,7 +76,9 @@ std::string formatJson(T value);
|
||||
void sortJson(nlohmann::json& json, const std::string& key);
|
||||
|
||||
/**
|
||||
* Converts the provided JSON object into its corresponding Dictionary format.
|
||||
* Converts the provided JSON object into its corresponding Dictionary format. Please note
|
||||
* that if the JSON contains keys that array of an array type, they are converted into a
|
||||
* Dictionary with numerical keys and the numerical keys start with 1.
|
||||
*/
|
||||
ghoul::Dictionary jsonToDictionary(const nlohmann::json& json);
|
||||
|
||||
|
||||
@@ -252,7 +252,9 @@ namespace {
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the provided JSON file and returns it back to the caller.
|
||||
* Loads the provided JSON file and returns it back to the caller. Please note that if the
|
||||
* JSON contains keys that array of an array type, they are converted into a Dictionary
|
||||
* with numerical keys and the numerical keys start with 1.
|
||||
*/
|
||||
[[codegen::luawrap]] ghoul::Dictionary loadJson(std::filesystem::path path) {
|
||||
if (!std::filesystem::exists(path)) {
|
||||
|
||||
Reference in New Issue
Block a user