I almost always read and write JSON to an IFS file simply because if I ever
need to debug it I can. It may take a few extra milliseconds but that's
not a big concern.

In your case it sounds like you are sending JSON to a request (not
receiving and parsing it).

In that case I would use yajl_writeStdout() which you can call after
building the JSON with YAJL. Then if you want to save it to the IFS you
can use yajl_saveBuf().

There is even a function to load a node from a stream file which may be
handy for your base64 data if that's in an IFS file to begin with.

On Tue, Mar 19, 2024 at 4:48 PM Justin Taylor <jtaylor.0ab@xxxxxxxxx> wrote:

I have an RPG program that processes CGI requests using the QtmhWrStout()
API. My problem is that with very large JSON payloads that contain a
Base64 encoded ZIP file.

I can set the paramter for QtmhWrStout() to be large enough, but it throws
a runtime error saying I've exceeded automatic storage. The program won't
compile with teraspace due to all the standard storage service programs it
references.

YAJL could handle it if I could write the payload to an IFS file, but
that's a nut I can't crack. I'm wondering whether my poor C++ skills are
up to writing a small module to do it.

Am I overlooking something?
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.



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.