Closed
Description
Given we're serializing a lot of cells, we can easily serialize the cells one by one and then construct the bytes from that, instead of building a string.
I.e. notebook = {cells: [.....], metadata: {...}}
pseudo code:
json = [TextEncoder.encode({
), ...notebook.cells.map(cell => TextEncoder.encode(JSON.stringify(cell)))];
Given that we know the indent level, its easy to construct the JSON string in pieces of bytes.