Hi,

I would need an example of what you are looking for....

If you want the response to be something like:

{
"sort" : "state, gender, age",

"resultSet" : [
{ "name" : "john doe", "street" : "some street", "State" : "mn",
"gender" : "male", "age" : 34 },
{ "name" : "john doe2", "street" : "some street", "State" : "mn",
"gender" : "male", "age" : 34 }
]
}

Then would need 2 output parameters, the first is character field called
"sort", the second is an array of structures called resultSet.



"WEB400" <web400-bounces@xxxxxxxxxxxxxxxxxx> wrote on 03/11/2019 03:33:52
PM:

From: Booth Martin <booth@xxxxxxxxxxxx>
To: "Web Enabling the IBM i (AS/400 and iSeries)"
<web400@xxxxxxxxxxxxxxxxxx>
Date: 03/11/2019 03:34 PM
Subject: [WEB400] IWS - example of nested json?
Sent by: "WEB400" <web400-bounces@xxxxxxxxxxxxxxxxxx>

The IWS Wizard:

Is there an RPG service program example for a nested json file?

For instance, lets say the DB2 data is:

name, street, city, state, gender, age

and I sort for:

state, gender, age

and want the json to reflect that nesting and include all of the data.

I can make a json file in the right order, with all of the data but it's

not nested. I can also do it with YAJL and create a nested json file.




This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2020 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].