Page 1 of 1

Best Practices for Handling Large JSON Responses with HTTPAPI

Posted: Tue Jan 20, 2026 9:04 am
by lucaspalm
Hi everyone,

I’ve been working with HTTPAPI on IBM i for some time now and recently ran into a situation where I need to handle large JSON responses from an API (in the order of several megabytes). While HTTPAPI can fetch and parse the data fine for smaller payloads, I’m concerned about memory usage and performance when the response is large.

Has anyone developed a strategy for:

Streaming or chunking the response instead of loading everything at once?

Efficiently parsing large JSON with HTTPAPI + YAJL?

Any tips on avoiding out of memory or slow performance?

Any insights, examples, or links to useful code snippets would be much appreciated. Thanks in advance!