10Duke Scale C++ Client
Loading...
Searching...
No Matches
JSONObject.h
1#ifndef TENDUKE_JSON_JSONOBJECT_H
2#define TENDUKE_JSON_JSONOBJECT_H
3
4#include "./JSONElement.h"
5
6#include <string>
7#include <map>
8#include <memory>
9
10namespace tenduke { namespace json {
11
15class JSONObject : public virtual JSONElement
16{
17public:
18 ~JSONObject() override = default;
19
25 virtual std::shared_ptr<JSONElement> getProperty(const std::string & propertyName) const = 0;
26
32 virtual bool hasProperty(const std::string & propertyName) const = 0;
33
39 virtual std::shared_ptr<JSONElement> removeProperty(const std::string & propertyName) = 0;
40
45 virtual const std::map<std::string, std::shared_ptr<JSONElement>> & getProperties() const = 0;
46};
47
48}}
49
50#endif // TENDUKE_JSON_JSONOBJECT_H
Superclass of JSON elements.
Definition JSONElement.h:12
JSON object element.
Definition JSONObject.h:16
virtual std::shared_ptr< JSONElement > removeProperty(const std::string &propertyName)=0
Removes property from this object.
virtual const std::map< std::string, std::shared_ptr< JSONElement > > & getProperties() const =0
Returns all properties of this object.
virtual bool hasProperty(const std::string &propertyName) const =0
Checks if the object has a property with given name.
virtual std::shared_ptr< JSONElement > getProperty(const std::string &propertyName) const =0
Returns object property by name.
JSON support.
Definition JSONArray.h:10
Root for classes, functions and globals of 10Duke C++ Client.
Definition BackendConfiguration.h:7