JSON Schema support in C++ with boost::json?

Nigel Stewart via Boost-users <[email protected]> Sun, 6 Apr 2025 08:58:27 +1000
Newsgroups gmane.comp.lib.boost.user
Message-ID <CAOD5mAHNwd2wYaA4m437ApSBap9F26qBESU=URqxgXgXKkYiqw@mail.gmail.com>
--===============8150797665666615565==
Content-Type: multipart/alternative; boundary="0000000000008c3c5706320ff162"

--0000000000008c3c5706320ff162
Content-Type: text/plain; charset="UTF-8"

Hello all,

There are a couple of things I'd like to do with JSON Schema in C++,
which are similar to protobuf, but JSON-centric.

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.

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.

What's out there?

- Nigel Stewart

--0000000000008c3c5706320ff162
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hello all,<div><br></div><div>There are a couple of things=
 I&#39;d like to do with JSON Schema in C++,<br>which are similar to protob=
uf, but JSON-centric.</div><div><br></div><div>1.=C2=A0 Generate a C++17 st=
ruct from a JSON Schema, names, types, optionality, nested data, arrays.<br=
>2.=C2=A0 Generate C++17 code for serialising to/from the natve C++17 struc=
t.<br>3.=C2=A0 Generate validation code that can emit informative messages =
about failed validation.</div><div><br></div><div>Seems to me this problem =
isn&#39;t specific to our application stack.<br>Essentially we want to pass=
 state between NodeJS and core C++ modules and have those interfaces evolve=
 over time in a maintainable way.</div><div><br></div><div>What&#39;s out t=
here?</div><div><br></div><div>- Nigel Stewart</div></div>

--0000000000008c3c5706320ff162--

--===============8150797665666615565==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Boost-users mailing list
[email protected]
https://lists.boost.org/mailman/listinfo.cgi/boost-users

--===============8150797665666615565==--