Boost logo

Boost Users :

From: Dominique Devienne (ddevienne_at_[hidden])
Date: 2025-04-07 08:00:36


On Sun, Apr 6, 2025 at 12:58 AM Nigel Stewart via Boost-users
<boost-users_at_[hidden]> wrote:
> 1. Generate a C++17 struct from a JSON Schema, names, types, optionality, nested data, arrays.
> 2. Generate C++17 code for serialising to/from the natve C++17 struct.
> 3. Generate validation code that can emit informative messages about failed validation.

Not sure about your #3, but #1 and #2 are covered by some existing tools.

Most from other ecosystems (JS/TS, Go, etc...) and many based on
OpenAPI rather than Json schemas.
Another team than mine uses Pistache for example, which generates C++
but uses nlohmann/json,
and that's Linux only I think, because it does the "RPC part" also,
using the Reactor pattern.

> Seems to me this problem isn't specific to our application stack.
> Essentially we want to pass state between NodeJS and core C++ modules
> and have those interfaces evolve over time in a maintainable way.

Quite common indeed, except for the part of the backend using C++ :).
Many more backends are in JS/TS, Go, Rust, etc... than C++ I'm afraid.
Thus interop with the C++ world is poorly supported by most tools. --DD


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net