10Duke Enterprise C++ Client
Loading...
Searching...
No Matches
SimpleJSONElement.h
1#ifndef TENDUKE_JSON_NJ_NJELEMENT_H
2#define TENDUKE_JSON_NJ_NJELEMENT_H
3
4#include "json/JSONElement.h"
5
6#include "nlohmann/json.hpp"
7
8namespace tenduke { namespace json {
9
10class SimpleJSONElement : public virtual ::tenduke::json::JSONElement
11{
12public:
13 explicit SimpleJSONElement(::tenduke::json::JSONElement::Type type)
14 : type(type)
15 {
16 }
17
18 std::string asJSON() const override;
19 std::string asString() const override;
21
22private:
24};
25
26}}
27
28#endif //TENDUKE_JSON_NJ_NJELEMENT_H
Superclass of JSON elements.
Definition JSONElement.h:12
Type
Type of the element.
Definition JSONElement.h:17
std::string asJSON() const override
Serializes the element as JSON.
Definition SimpleJSONElement.cpp:14
::tenduke::json::JSONElement::Type getType() const override
Returns type of this element.
Definition SimpleJSONElement.cpp:8
std::string asString() const override
Gets the value of the element as a string.
Definition SimpleJSONElement.cpp:26
JSON support.
Definition JSONArray.h:10
Root for classes, functions and globals of 10Duke C++ Client.
Definition APIRequest.h:4