Boost logo

Boost :

From: Julien Blanc (julien.blanc_at_[hidden])
Date: 2020-09-23 12:17:11


Le 2020-09-23 10:17, Gavin Lambert via Boost a écrit :
> On 23/09/2020 18:31, Julien Blanc wrote:

> And if anything, it should improve performance (by not doing it when
> not needed); I don't see why you think it'd be less efficient in an
> upper layer.

The number would need to be parsed twice: first in the json parser, to
check it is a valid number, secondly in the handler, to give an actual
number. Given that some json parsing libraries implements their own
number parsing to avoid this double parsing, constructing the value on
the fly, i’m not alone in thinking it makes a difference (from what i've
seen, boost::json authors also are on that boat, which makes their
interface choice a logical one).

Regards,

Julien


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