USCiLab/cereal

deserialize json with cereal

yuvalco opened this issue · 0 comments

I am trying to deserialize json file, the problem is that ifstream is not supported from what I have seen in another issue and tried myself.
so this:

std::ifstream input("config.json");
cereal::JSONInputArchive archive(input);

won't work.

I have tried to read each line of the file into stringstream , which also isn't working because from what I have seen cereal::JSONInputArchive
expect the format of the json to have quotation mark
with escape characters like this - \"
and stringstream isn't doing that while reading reading the file line by line.

I have searched the net and Cereal docs but couldn't find a way to deserialize json.