Can not parse JSON

I have a problem with parsing JSON. I have such JSON:

I used JSON Path and after Ungroup nodes.

After that I used again JSON Path and can’t parse it…

Hi @KhrystynaKMI,

might I ask you to upload your workflow and some sample data. Without having a look at the full JSON that fails I fear there is no chance in helping you out.

Cheers
Mike

1 Like

Hi @mw

That’s what I wanted to ask: can I parse a JSON like this (on the previous screen).
Because I can parse a JSON that looks like the screen very quickly and easy.


I add .txt file with JSON.
This file I get using Python.
output.txt (33.8 KB)

And this JSON I can’t parse in the KNIME.

Hi @KhrystynaKMI,

I think the data you provided looks like JSON but is just a bunch of JSON elements with text. Trying to convert it to XML gave back a string. Trying to select, either automatically or manually, child elements, did not work. Opening in an editor like sublime, did not result in the regular syntax highlighting. Trying to use online JSON formatter … again just strings.

I’ve sanitized your data by:

  1. Replacing single by double quotes
  2. Fixed strings containing correct single quotes like “it’s” or real quotes

Afterwards, your JSON was real JSON :wink:

Happy data processing
Mike

output.json (61.0 KB)

3 Likes

Hi @mw

Thanks a lot for your help!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.