OPAL
json.h
Go to the documentation of this file.
1 
10 #pragma once
11 
12 #include "json11/json11.hpp"
13 
14 #include <string>
15 #include <stdexcept>
16 #include <fstream>
17 
18 
19 namespace util {
20 
23 
24 
29 class JsonParseException : public std::runtime_error {
30 public:
32  using std::runtime_error::runtime_error;
33 };
34 
35 
45 Json JsonFromFile(const std::string &fileName);
46 
52 Json JsonFromFile(const char *fileName);
53 
59 Json JsonFromFile(std::ifstream &inputStream);
60 
70 Json JsonFromString(const std::string &inputStr);
71 
72 } // namespace util
73 
Definition: Directory.cpp:6
Definition: json11.hpp:79
Simple exception class representing a failure occurred during parsing a JSON file (runtime error)...
Definition: json.h:29