2 ms·
> Some Google protobufs had thousands of optional fields so the wire format became: > [null,null,null,null,...many times over...,null,"foo"] In pblite, they
by j16sdiz 3y ago
> Some Google protobufs had thousands of optional fields so the wire format became:
> [null,null,null,null,...many times over...,null,"foo"]
In pblite, they are serialized as `[,,,,...many times over...,,"foo"]`. Just comma, no "null".
- cletus 3y ago> JSON.parse('[null,null,null]') > (3) [null, null, null] > JSON.parse('[,,,]') Uncaught SyntaxError... Maybe eventually someone realized this was horribly inefficient and added an extra step but a series of commas in an array with nothing in between them isn't valid JSON.