Dumps the JSON object to a formatted string.
| 38 | |
| 39 | // Dumps the JSON object to a formatted string. |
| 40 | std::string ConfigFile::dump() const { |
| 41 | // The argument '4' pretty-prints the JSON with an indent of 4 spaces. |
| 42 | // Use dump() with no arguments for a compact output. |
| 43 | return json_.dump(4); |
| 44 | } |
| 45 | |
| 46 | // Saves the current JSON object to a file. |
| 47 | void ConfigFile::save(const std::string& file_path) { |