Find Related products on Amazon

Shop on Amazon

Progressive JSON

Published on: 2025-06-11 15:58:00

May 31, 2025 Do you know about Progressive JPEGs? Here’s a nice explanation of what a Progressive JPEG is. The idea is that instead of loading the image top to bottom, the image instead is fuzzy at first and then progressively becomes more crisp. What if we apply the same idea to transferring JSON? Suppose you have a JSON tree with some data: { header: ' Welcome to my blog ' , post: { content: ' This is my article ' , comments: [ ' First comment ' , ' Second comment ' , // ... ] }, footer: ' Hope you like it ' } Now imagine you want to transfer it over the wire. Because the format is JSON, you’re not going to have a valid object tree until the last byte loads. You have to wait for the entire thing to load, then call JSON.parse , and then process it. The client can’t do anything with JSON until the server sends the last byte. If a part of the JSON was slow to generate on the server (e.g. loading comments took a slow database trip), the client can’t start any work until the server ... Read full article.