News for hackers. Stuff that matters.
Re:Progressive JSON by __mattya on Sunday June 01, 2025 @07:47AM (#44150196)
They want to know where the holes are so that they can show a loading state.
Re:Progressive JSON by atombender on Sunday June 01, 2025 @07:58AM (#44150238)
You don't need templating ($1 etc.) for that as long as you can describe the holes somehow, which can be done out-of-band.

If we imagine a streaming protocol of key/value pairs that are either snapshots or deltas:

    event: snapshot
    data: {"topPost":[], "user": {"comments": []}}
    pending: topPosts,user.comments

    event: delta
    data: [17,{"comments":[{"body":"hello world"}]},"user"]
    pending: topPosts