Boost logo

Boost :

From: Alexander Grund (alexander.grund_at_[hidden])
Date: 2020-09-10 15:14:46

>> 1. The usage of `nullptr` for null values.
> Well, as you said I could add json::null_t and a constant json::null.
> It isn't clear if that is better. With this library I have tried to
> avoid a proliferation of types, to keep things simple.
We have other cases, e.g. boost::none(_t) for optional. But as in this
case it is the same as a default constructed value, why do we need it?
In C++11 (which this library targets) you could use `return {};` and the
I guess it is fine though as JSON null and nullptr are close enough in
> buf ) writes data to the buffer you supply
I get the rationale. But reading that code I would expect that "s" reads
from "buf". So to me the behavior is confusing and hence error prone.
Could you explore alternatives?

Boost list run by bdawes at, gregod at, cpdaniel at, john at