JSON Tool Store multirow data without named base object

Confluence User - 23 May, 2016

Hi,

I am using a few APIs returning JSON and it works like a charm - thanks for providing the tool and documentation at "Configure JSON Tool based on JSON data structure".

I was wondering how I can store multi-row data from a returned json without a named base object.

Often the returned data looks like this:

[{

"id":2,

"name":"test1",

...

}, {

"id":3,

"name":"example",

...

}]

How would I go about configuring the json tool to store multirow data in this case?

Cheers,

Eric 

json;tools;grid;forms

2


24 May, 2016
confluenceUser
confluenceUser

Hi, looking at the source code for the JSON tool at https://github.com/jogetworkflow/jw-community/blob/7a608018aa940373883b73ff6ad61a23cd518332/wflow-core/src/main/java/org/joget/apps/app/lib/JsonTool.java, I think it expects the JSON response to be an object and not an array. You could try to extend the plugin to support arrays if you need it.

24 May, 2016
confluenceUser
confluenceUser

Hi Anders, Thanks for digging that out. I haven't done any work in java for a long time so me trying to extent the plugin probably does more damage than good... It may be something for the Joget team's feature / improvements list though because arrays don't strike me as uncommon JSON responses. Cheers, Eric

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print