Boost logo

Boost :

From: Vinnie Falco (vinnie.falco_at_[hidden])
Date: 2020-09-16 14:11:03

On Wed, Sep 16, 2020 at 6:33 AM Peter Dimov via Boost
<boost_at_[hidden]> wrote:
> The one interesting decision that needs to be made here is how to handle
> CBOR byte strings (major type 3), as they aren't representable in JSON or in
> the current boost::json::value.
> I see that Niels Lohmann has added a "binary" 'kind' to the json value for
> this purpose. Which would then invite the opposite question, what's a JSON
> serializer supposed to do with kind_binary.

If I make a library that has a public function which accepts a
parameter of type json::value, I don't expect to see binary objects in
it nor would I want to have to write code to handle something that is
not part of JSON. And I expect that things round-trip correctly, i.e.
if I serialize a json::value and then parse it, I get back the same
result. This is clearly impossible if the json::value contains a
"binary" string.

If CBOR was just another serialization format, then I might lean
towards implementing it. But CBOR is sounding more and more like it is
Not JSON and thus out-of-scope for Boost.JSON.


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