我正在使用NLHHMAN的JSON库来与C++中的JSON对象一起工作.最后,我想从一个文件中读取一个json对象,例如这样一个简单的对象.
{
"happy": true,
"pi": 3.141
}
I'm not quite sure how to approach this. At https://github.com/nlohmann several ways are given to deserialise from a string literal, however it doesn't seem trivial to extend this to read in a file. Does anyone have experience with this?