Header file declaring interface for various operations with JSON.
More...
#include "json11/json11.hpp"
#include <string>
#include <stdexcept>
#include <fstream>
Go to the source code of this file.
|
Json | util::JsonFromFile (const std::string &fileName) |
| Read JSON from file, specified by name. More...
|
|
Json | util::JsonFromFile (const char *fileName) |
| Read JSON from file, specified by name. More...
|
|
Json | util::JsonFromFile (std::ifstream &inputStream) |
| Read JSON from file stream. More...
|
|
Json | util::JsonFromString (const std::string &inputStr) |
| Read JSON from string (for ex. More...
|
|
Header file declaring interface for various operations with JSON.
- Author
- Denis Zobnin
§ JsonFromFile() [1/3]
Json util::JsonFromFile |
( |
const std::string & |
fileName | ) |
|
Read JSON from file, specified by name.
- Parameters
-
[in] | fileName | Name of file to read. |
- Returns
- Parsed Json object.
- Exceptions
-
§ JsonFromFile() [2/3]
Json util::JsonFromFile |
( |
const char * |
fileName | ) |
|
Read JSON from file, specified by name.
See JsonFromFile(std::string).
§ JsonFromFile() [3/3]
Json util::JsonFromFile |
( |
std::ifstream & |
inputStream | ) |
|
Read JSON from file stream.
See JsonFromFile(std::string).
§ JsonFromString()
Json util::JsonFromString |
( |
const std::string & |
inputStr | ) |
|
Read JSON from string (for ex.
file contents).
- Parameters
-
[in] | inputStr | String from which data is read. |
- Returns
- Parsed Json object.
- Exceptions
-