Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
PhilHibbs
Creator II
Creator II

Any good tWriteJSONField tutorials?

I'm struggling with anything more than a very simple JSON structure. I can create a JSON that has one array element in it, but as soon as it needs anything more (e.g. an array of questions, each one of which contains an array of answers) I get lost. Are there any good examples of building complex JSON structures with tWriteJSONField components?

Labels (3)
13 Replies
navds
Creator II
Creator II

Maybe someone has a better technique but I don't like to use dozens of tLibraryLoad to import external jars. I prefer adding it in routine dependencies. In this basic example, I downloaded manually the jar json-20171018.jar (yeah, I wish this could be done project-wide using maven), created a new routine 'Demo', edit routine libraries to add the jar. Now I have a JSON parser which could be used project-wise. Here, I returned a java.util.Map which should be familiar. 

0683p000009M23j.png0683p000009M23t.pngbrowse on your computer


0683p000009M1yL.png

I hope this helps. 

 

davechurchley
Contributor
Contributor

Hi Phil

This looks like the kind of thing I need to do. Do you have any screenshots showing how to work through your steps, please?

Thanks
Dave
davechurchley
Contributor
Contributor

OK, I've got this working now using a tMap instead of the tExtractJSONField component.
Nordom_LH
Contributor
Contributor

how have you done it?