Forum

JsonReader - Help appreciated

Hi!

I have trouble getting the JsonReader to work.
Starting with the JsonReader help patch, I try to replace the example file with my own file (a spotify streaminghistory file; I have attached an anonymous pseudo example file with the same structure StreamingHistory_example.zip (339 Bytes) ), but I can’t get it to output anything. I assume it has something to do with the notice in the help file :
"Note, very often JSON files are coming with multiple properties sitting directly in the root element, in this case parsing the file fails and the JSONReader returns an empty XDocument.
In this case, just define a custom root element by setting the “Deserialize Root Element Name” input pin, like in this example."
Being new to json and XElements I tried some things without really knowing what to do.

So, any help is much appreciated,
thanks in advance!

48
Its a workaround rather than a fix. It depends on how the json is written. It needs to have a root object, but yours was just the inner elements.

2 Likes

Wow - thank you very much, it works!

Thanks a lot!

1 Like