INNER CODE UNIT · Python
_parse_schema_entry
kevinpbuckley/VibeUE · Content/Python/vibeue.py:50
def _parse_schema_entry(raw):
if isinstance(raw, str):
try:
raw = json.loads(raw)
except ValueError:
return None
if isinstance(raw, dict):
return raw
return None
def _all_schema_entries():
"""Toolset schema dicts from get_all_toolset_json_schemas(), which returns ONE JSON string
holding a list of {name, version, description, tools} entries (not a list of strings)."""
raw = unreal.ToolsetRegistry.get_all_toolset_json_schemas()
if isinstance(raw, (str, bytes)) or not hasattr(raw, "__iter__"):
try:
doc = json.loads(str(raw))