|
|
Subscribe / Log in / New account

Why not JSON?

Why not JSON?

Posted Aug 12, 2017 9:51 UTC (Sat) by mbunkus (subscriber, #87248)
In reply to: Why not JSON? by nybble41
Parent article: An alternative device-tree source language

Exactly. A lot of folks assume that JSON's number type is limited the same way JavaScript's is, but that simply isn't true. The JSON spec does not limit it at all. JSON is independent of JavaScript.

As an example of how wide-spread this false assumption is, look at Qt[1]. Their JSON implementation stores all numbers internally as doubles, losing significant precision for large integer values. This bug has been present for the whole Qt5 lifetime and is still unsolved, making the implementation completely unusable for interfacing with external systems where you do not have control over the data format.

[1] https://bugreports.qt.io/browse/QTBUG-28560


to post comments


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds