Document.hpp
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #include <ejson/Value.hpp>
9 #include <vector>
10 #include <etk/types.hpp>
11 #include <ejson/String.hpp>
12 #include <ejson/Array.hpp>
13 #include <ejson/Object.hpp>
14 
15 namespace ejson {
19  class Document : public ejson::Object {
20  public:
30  Document(const ejson::Document& _obj);
34  Document();
47  bool parse(const std::string& _data);
54  bool generate(std::string& _data);
61  bool load(const std::string& _file);
68  bool store(const std::string& _file);
75  bool storeSafe(const std::string& _file);
80  void setDisplayError(bool _value);
86  bool getDisplayError();
90  void displayError();
91  };
92 }
93 
void displayError()
Display error detected.
Document()
Constructor.
the element "..."
ejson namespace containing all function for JSON interpretor
Definition: Array.hpp:12
ejson Object interface { ... }.
Definition: Object.hpp:18
bool generate(std::string &_data)
generate a string that contain the created Json
bool parse(const std::string &_data)
parse a string that contain an Json
void setDisplayError(bool _value)
Set the display of the error when detected.
bool load(const std::string &_file)
Load the file that might contain the Json.
ejson Document interface (acces with the file and stream).
Definition: Document.hpp:19
bool getDisplayError()
Get the display of the error status.
bool storeSafe(const std::string &_file)
Store the Json in the file (safe mode mean that the file is store in a second file xxx...
bool store(const std::string &_file)
Store the Json in the file.
ejson::Document & operator=(const ejson::Document &_obj)
Copy constructor.