JsonConfig: allow JSON files without "modules" key

This commit is contained in:
李通洲
2023-06-21 16:21:14 +08:00
parent 151753cb2f
commit 5b5527f4c9
+1 -1
View File
@@ -230,7 +230,7 @@ static const char* printJsonConfig(FFinstance* instance)
return "Invalid JSON config format. Root value must be an object";
yyjson_val* modules = yyjson_obj_get(root, "modules");
if (!modules) return "Property 'modules' is not found";
if (!modules) return NULL;
if (!yyjson_is_arr(modules)) return "Property 'modules' must be an array of strings or objects";
yyjson_val* item;