-1 result importing JSON into dict

joshua goldberg's icon

Hello all. I am attempting to import a large JSON file into a dict structure.

This is the file.

When I import it, I get a -1 result. The JSON is validated according to this online tool.

Any help at all would be appreciated.

joshua goldberg's icon

I understand at this point the main problem with that JSON: The nested arrays are unnamed. I guess what I need to do is scan through the wall nodes and the image/video nodes and add names for the nodes in the file. Or is there an easier way? I'd prefer to use Max 6 for this instead of 7, if possible.

Jan M's icon

The json file has an array as a to level object. Dict doesn't allow that. Wrap the first array into an object and assign the array to a key - that'll work.

{
    "foo" : [
        {.....},
        {.....},
        {.....},
    ]
}

(File attached)

Cheers, Jan

test.json_.txt
txt
Jason Jorden's icon

I understand at this point the main problem with that JSON: The nested arrays are unnamed. I guess what I need to do is scan through the wall nodes and the image/video nodes and add names for the nodes in the file. Or is there an easier way? I'd prefer to use Max 6 for this instead of 7, if possible. happy wheels