4 ms·
You need to parse that. For graphs with thousands of data points just use Unix time plus a timezone or use the browser's timezone. ISO 8601 would leave your gra
by petre 6y ago
You need to parse that. For graphs with thousands of data points just use Unix time plus a timezone or use the browser's timezone. ISO 8601 would leave your graphs churning for seconds.
- bryanlarsen 6y agoIf 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.