10Duke Enterprise C++ SDK
Toggle main menu visibility
Loading...
Searching...
No Matches
SimpleJSONString.h
1
#ifndef TENDUKE_JSON_SIMPLEJSONSTRING_H
2
#define TENDUKE_JSON_SIMPLEJSONSTRING_H
3
4
#include "./SimpleJSONElement.h"
5
#include "json/JSONString.h"
6
7
namespace
tenduke
{
namespace
json
{
8
9
class
SimpleJSONString :
public
virtual
::tenduke::json::JSONString
,
public
::tenduke::json::SimpleJSONElement
10
{
11
public
:
12
explicit
SimpleJSONString(
const
std::string &value)
13
: SimpleJSONElement(::tenduke::json::JSONElement::Type::STRING)
14
, value(value)
15
{
16
}
17
18
std::string
asJSON
()
const override
19
{
20
return
std::string(
"\""
) +
getValue
() +
'"'
;
21
}
22
23
std::string
asString
()
const override
24
{
25
return
getValue
();
26
}
27
28
std::string
getValue
()
const override
29
{
30
return
this->value;
31
}
32
33
protected
:
34
std::string value;
35
};
36
37
}}
38
39
#endif
//TENDUKE_JSON_SIMPLEJSONSTRING_H
tenduke::json::JSONString
JSON string element.
Definition
JSONString.h:14
tenduke::json::SimpleJSONElement
Definition
SimpleJSONElement.h:11
tenduke::json::SimpleJSONString::getValue
std::string getValue() const override
Returns the value of this string.
Definition
SimpleJSONString.h:28
tenduke::json::SimpleJSONString::asString
std::string asString() const override
Gets the value of the element as a string.
Definition
SimpleJSONString.h:23
tenduke::json::SimpleJSONString::asJSON
std::string asJSON() const override
Serializes the element as JSON.
Definition
SimpleJSONString.h:18
tenduke::json
JSON support.
Definition
JSONArray.h:10
tenduke
Root for classes, functions and globals of 10Duke C++ Client.
Definition
APIRequest.h:4
core
services
common
src
json
SimpleJSONString.h
Generated by
1.17.0