On Sun, 22 Sep 2019 at 19:05, Vinnie Falco via Boost
I've been working on a massively-multiplayer online blackjack casino server, called Beast Lounge [1]. The server and client communicate using JSON-RPC over WebSocket. I have developed a brand-new JSON library for this project, in accordance with the following design goals:
* Robust support for custom allocators throughout. * Array and object interfaces closely track their corresponding C++20 container equivalents. * Use `std::basic_string` for strings. * Minimize use of templates for reduced compilation times. * Parsers and serializers work incrementally (['online algorithms]). * Elements in objects may also be iterated in insertion order.
You can see the JSON library in development here:
Features that matter to me: - no allocation, ever - parsing/generating data incrementally from/into segmented buffers without copying - full arbitrary-precision decimal support without imposing a decimal representation on me - not imposing any string or blob type - fast conversion between numbers and text, with correct shortest representation for floating-point Unfortunately your library does not satisfy all of those criteria, so it is not very useful to me. Main problem appears to be that the parser is hardcoded to convert the values into a specific type. In practice I use JSON as a self-describing serialization/deserialization system in text form, which also happens to work well as a representation to transmit data across systems and languages. I do not want to convert a stream of JSON bytes into a boost::json::value type, which might already be a lossy conversion, I want to convert it directly to my type.