Peter Dimov
Peter Dimov
It's copied from the benchmark code. This needs to be refactored to contain the subhandlers inline in the composite handlers, rather than allocating them with `new` each time. ("Structured concurrency"...
Also needs a handler for `json::value`, so that json files that have random unstructured parts can still fit into a structure. I had to remove the `opts` part of the...
> This needs to be refactored to contain the subhandlers inline in the composite handlers, rather than allocating them with `new` each time. ("Structured concurrency" :-) ) (Also, needs a...
The easiest fix here is to change the specification of `value_to` as follows: ``` template T value_to( value const& v ); template T value_to( U const& v ) = delete;...
Arrays are always hashed in the same way, pretty much as implemented in the above comment; the only difference is whether the size is hashed first (as most people do)...
What do you accept for NaN or infinity?
The [JSON5 spec](https://spec.json5.org/#numbers) also allows `+NaN`, `-NaN` and `+Infinity`: > The IEEE 754 value positive infinity must be the literal characters Infinity and may be prefixed with an optional plus...
> What would "supporting optional" look like? Default implementations of `value_from` and `value_to` for `std::optional`.
`boost::optional` can be supported on the `boost::optional` side. There's no need for JSON to know about all the optionals.
Testing against an absolute epsilon isn't quite correct, because the precision of `double` varies depending on its magnitude.