Read text or JSON data from a file. More...
#include <Malena/Utilities/FileReader.h>
Static Public Member Functions | |
| static std::optional< json > | readJson (const std::string &path) |
| Parse a JSON file. | |
| static std::optional< std::string > | readText (const std::string &path) |
| Read the entire contents of a file as a string. | |
Read text or JSON data from a file.
Definition at line 29 of file FileReader.h.
|
static |
Parse a JSON file.
ml::json, or std::nullopt if the file could not be opened or contains invalid JSON.
|
static |
Read the entire contents of a file as a string.
std::nullopt if the file could not be opened.