diff --git a/include/openspace/util/json_helper.h b/include/openspace/util/json_helper.h index 8d089cdee2..00e5f62b6c 100644 --- a/include/openspace/util/json_helper.h +++ b/include/openspace/util/json_helper.h @@ -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); diff --git a/src/engine/openspaceengine_lua.inl b/src/engine/openspaceengine_lua.inl index 43a85dabc7..128133a9f0 100644 --- a/src/engine/openspaceengine_lua.inl +++ b/src/engine/openspaceengine_lua.inl @@ -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)) {