Progressive JSON
overreacted.io
Progressive JSON
1–10 of 244 posts
Re: Progressive JSON
#2[dead]
Re: Progressive JSON
#3I think the pydantic library has something similar that involves validating streaming JSON from large language models.
Re: Progressive JSON
#4We encountered this problem when converting audio only LLM applications to visual + audio.
The visuals would increase latency by a lot since they need to be parsed completely before displaying, whereas you can just play audio token by token and wait for the LLM to generate the next one while audio is playing.
Re: Progressive JSON
#5I've always liked the idea of putting latency requirements in to API specifications. Maybe that could help delimit what is and is not automatically inlined as the author proposes.
Re: Progressive JSON
#6jsonl is json objects separated by endline characters. Used in Bedrock batch processing.
Re: Progressive JSON
#7jsonl is json objects separated by endline characters. Used in Bedrock batch processing.
ndjson is extremely similar, Splunk uses it for exporting logs as json
Re: Progressive JSON
#8Very cool point, and it applies to any tree data in general.
I like to represent tree data with parent, type, and data vectors along with a string table, so everything else is just small integers.
Sending the string table and type info as upfront headers, we can follow with a stream of parent and data vector chunks, batched N nodes at a time. Tye depth- or breadth-first streaming becomes a choice of ordering on the vectors.
I'm gonna have to play around with this! Might be a general way to get snappier load time UX on network bound applications.
Re: Progressive JSON
#9If it has to be mangled to such an extent to do this, then it seems reasonable to assume JSON is the wrong format for the task.
Better to rethink it from scratch instead of trying to put a square peg in a round hog.
Re: Progressive JSON
#10I feel like in an ideal world, this would start in the DB: your query referencing objects and in what order to return them (so not just a bunch of wide rows, nor multiple separate queries) and as the data arrives, the back end could then pass it on to the client.