Hacker News new | past | comments | ask | show | jobs | submit login

> 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".




    > 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.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: