How to use a hierarchical JSON as asset in ContentBrowser

Hi,

is it possible to add a hierarchical JSON-file in the Content-browser ? I can add lists (actually used CSV) after defining the format in C++ (by deriving a struct from FTableRowBase), but how would that work for hierarchical data (not plain lists) ?

The format of the data I want to import looks something like this:

{
"GROUP1" : ["FJ3337.obj","FJ3339.obj","FJ3333.obj","FJ3335.obj"],
"GROUP2" : ["FJ3338.obj","FJ3334.obj","FJ3336.obj","FJ3330.obj","FJ3332.obj","FJ3348.obj","FJ3344.obj"],
"GROUP3" : ["FJ3333.obj","FJ3335.obj"]
}

and it would be nice to have it mapped in C++ to the “AllData”-struct below (or alternatively simply as an array of data “GroupData”-structs):

struct GroupData
{
  FString GroupName;
  TArray<FString> GroupElements;
}

struct AllData
{
  TArray<GroupData> Groups;
}

Is this somehow possible ? And if not, what’s the closest I could get ?

Thank you & best regards,
Lennert

You will probably need to create a new Asset Factory for this.
(Custom editor module)

or alternatively:

Is it possible to add some files to the Content (via the ContentBrowser) without specifying its format at all and just getting raw (binary or text) access to this file in C++ (as I don’t need to edit the resource in the UnrealEditor itself) ?

Yes, take a look at DataAsset class