4 ms·
If parse time is a significant concern, why are you using JSON?
by bryanlarsen 6y ago
If parse time is a significant concern, why are you using JSON?
- petre 6y agoBecause we feed the data to Js. No need for additional overhead parsing string based timestamps. Unix epoch is just an int. We don't need pre 1970 timestamps.
- RedShift1 6y agoPre-1970 timestamps work too: Welcome to Node.js v12.18.4. Type ".help" for more information. > new Date(-10000) 1969-12-31T23:59:50.000Z
- Inufu 6y agoJavaScript can parse binary serialised protobufs.
- petre 6y agoYup with external libs. JSON.parse is builtin. We do the renderin in browser so why bother with protobuf.