Boost logo

Boost :

From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2020-09-18 09:35:03


On Fri, 18 Sep 2020 at 09:18, Richard Hodges via Boost
<boost_at_[hidden]> wrote:

> JSON is in the main used as a language and platform agnostic data
> interchange format. The *de-facto* reality is that every other platform and
> language implementation that I can think of limits real numbers to doubles
> and integers to the range +-2^63, so it seems to me that going beyond that
> will achieve little in terms of general utility.
>
> This is the situation today.

That is just not true.
There are many implementations of JSON under the sun, some quite
low-key and homemade (it's pretty trivial after all), and quite a lot
do it correctly.

Also many people doing it wrong is not an argument.

>
> I understand the argument that this library could be an opportunity to push
> the boundaries and lead other languages to better practice.
>
> On the other hand, this is not the stated intent of the library - it's
> intent (in summary) is to meet the needs of the majority of C++ programmers
> who wish to interoperate with the world wide web today.
>
> Along with others here I am sure, I have significant experience in dealing
> with financial and cryptocurrency data interchange using JSON. The *reality*
> is that one learns *not to rely on the various interpretations of number
> values at all*.
> If you're sending an important value (such as a price) you very quickly
> learn to encode it as a JSON string representing the exact value and
> precision you want.

Well I've been working in high-frequency trading for years, and I have
the opposite experience.
Representation of numbers is serious business, be them fixed- or
float-precision, binary or decimal. If you can't even get that right
and have to use strings, you're in for a lot of problems.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk