ESPAsyncWebServer icon indicating copy to clipboard operation
ESPAsyncWebServer copied to clipboard

send very large JSON response

Open marchingband opened this issue 3 years ago • 1 comments

Hello, I'm using AsyncJsonResponse * response = new AsyncJsonResponse(true); to send a very large JSON array response of almost 500k. Smaller responses work, but with 500k I get pcb is NULL, and no data is sent. I am using WROVER module, so I have lots of psram available.

Is there anything i can tweak in your library to allow me to stream this many characters in a response? Is there another approach possible that I am missing?

I have had success printing this same JSON to a string in memory, and then using request->beginResponse() to send it in chunks, but I want to switch to a streaming approach to save memory.

If I can find a way to solve this, I would be happy to contribute a PR, so others can enjoy the ability to work with very large JSON data.

Thank you!

marchingband avatar Nov 07 '22 20:11 marchingband

[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 18 '23 13:06 stale[bot]