Take a look at JSON for Modern C++: https://github.com/nlohmann/json
Perhaps this example (benchmark, actually) is close enough: https://github.com/nlohmann/json/blob/master/benchmarks/benc...
Note that the above also performs mini-benchmark with multiple iterations, dumping parsed data to another file, and finishes with a clean-up of the aforementioned dump target file.
The core (read, parse, write) can be simplified to:
std::ifstream input_file("data.json");
nlohmann::json data;
data << input_file;
std::cout << data;