4 ms·
I'm, not sure I agree that the solution is always to use a schema... In general, yes, it's a good idea. However, it seems to me that, in this particular example
by webnrrd2k 11y ago
I'm, not sure I agree that the solution is always to use a schema... In general, yes, it's a good idea. However, it seems to me that, in this particular example, the correct format could be determined by the device_id in the JSON formatted text. That is, the date format when device_id=123 is X, the date format when device_id=watch_345is Y, etc... If there are a small number of device_ids then it's a workable solution, maybe even preferable if the amount of data to be transferred needs to be minimized.
However, once JSON was used, then I would almost certainly have put in a schema/format/version field in a header.