× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Mark,

The caveat to YAJLGEN is that there's a lot of information that RPG needs that simply isn't in the JSON file.  For example, the JSON file may tell you there's an array, but it doesn't tell you how many maximum elements the array could ever hold.   Likewise, it can tell you there's a string, but it doesn't tell you the maximum size that can ever be in a string.

But, it does the best it can, and you can go in and tweak the RPG code as needed.

Let me know how it works for you,

-SK


On 12/30/2019 9:45 AM, mlazarus wrote:
Thanks!

On 12/30/2019 8:47 AM, Greg Wilburn wrote:
Scott's YAJLGEN command works GREAT to create a base data structure for you using a JSON sample on the IFS.
Very nice utility to complement YAJLINTO.

-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxxxxxxxx] On Behalf Of Bryan Dietz
Sent: Thursday, December 26, 2019 1:37 PM
To: RPG programming on IBM i<rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: Utility to map JSON into the corresponding DS layout?

have you seen Scott's YAJL ?
http://www.scottklement.com/yajl/

<snip>
Note: Updated July 29, 2019 added YAJLGEN utility, and ability to write
*STDIN data to IFS.

Note: Updated November 25, 2019 added YAJLDTAGEN (DATA-GEN interface),
and yajl_addPreformattedPtr routine.
</snip>


maybe that will work?

Bryan



mlazarus wrote on 12/26/2019 1:12 PM:
    I am looking for an automated way to take a sample JSON file and build
the corresponding DS in RPG.  Is there a utility for that?  Or maybe
something built into RDi?

   I thought there was a Midrange discussion about this a while back, but
can't seem to locate it.  TIA.

   -mark

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2024 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.