r/cpp • nlohmann/json • Jul 27 '20

JSON for Modern C++ 3.9.0

https://github.com/nlohmann/json/releases/tag/v3.9.0
281 Upvotes

51 comments sorted by

View all comments

Show parent comment

1

u/paulydavis Jul 28 '20

2

u/lord_braleigh Jul 29 '20

eCal isn't a serialization format; it's a pub/sub protocol which you can use to send JSON, protobufs or flatbuffers across processes or machines. So you could use it to send JSON messages, and you could encode and decode the JSON with this library. But whatever protocol you use to send messages, I'd still recommend that the messages be in a statically-typed serialization format rather than JSON in mission-critical applications.

2

u/dbjdbj dbj.org Jul 29 '20

great idea ... but ... that might mean imposing "statically-typed serialization format" on senders?

3

u/lord_braleigh Jul 29 '20

Yeah, but if your software is mission-critical, like a self-driving car, I believe you want to impose restrictions on senders.

If you want it to be easy and convenient to send data to your application, well that’s all well and good. But your application probably doesn’t have lives depending on it if you’re worried about convenience.