cereal

Is there a way to specify a simpler JSON (de-)serialization for std::map using Cereal / C++?

℡╲_俬逩灬. 提交于 2019-12-03 12:40:35
The project I'm working on is a C++ application that manages a large number of custom hardware devices. The app has a socket/port interface for the client (like a GUI). Each device type has its own well-defined JSON schema and we can serialize those with Cereal just fine. But the app also needs to parse inbound JSON requests from the client. One portion of the request specifies device filter parameters, roughly analogous to a SQL 'WHERE' clause in which all the expressions are ANDed together. E.g.: "filter": { "type": "sensor", "status": "critical" } This would indicate that the client wants