23 Sep
2020
23 Sep
'20
12:17 p.m.
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