×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Hi All,

Found the solution

We need to define the Data structure like below and using DATA-GEN I am
able to achieve this

dcl-ds Student;
num_student int(10);
dcl-ds student dim(9);
studentName char(100);
studentJoiningDate char(10);
num_studentSubject int(10);
studentSubject char(10) dim(9);
end-ds;
end-ds;

Regards,
Suren

On Wed, Jun 29, 2022 at 9:31 AM Suren K <suren7437@xxxxxxxxx> wrote:

Hi All,

Currently I am using DATA-INTO and DATA-GEN for parsing/generating JSON
document. Also I am using YAJL Parser and Generator as well.

Now I have a tricky JSON requirement which I am not sure whether I can
achieve using DAT-GEN. The sample JSON data is below

{
"student": [
{
"studentName": "John",
"studentJoiningDate": "2010-08-29",
"studentSubject": [
"Science",
"Maths",
"Social",
"ComputerScience"
]
}
]
}

Is it possible to generate a JSON Array without field names like
studentSubject?

Any help/suggestions will be very much appreciated.

Regards,
Suren


As an Amazon Associate we earn from qualifying purchases.

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-2026 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].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.