1#ifndef TENDUKE_JSON_CJSONOBJECT_H
2#define TENDUKE_JSON_CJSONOBJECT_H
4#include "./CJsonElement.h"
5#include "json/JSONObject.h"
23 std::unique_ptr<std::map<std::string, std::shared_ptr<tenduke::json::JSONElement>>> properties,
32 std::shared_ptr<tenduke::json::JSONElement>
getProperty(
const std::string &propertyName)
const override;
33 bool hasProperty(
const std::string &propertyName)
const override;
34 std::shared_ptr<tenduke::json::JSONElement>
removeProperty(
const std::string & propertyName)
override;
35 const std::map<std::string, std::shared_ptr<tenduke::json::JSONElement>> &
getProperties()
const override;
38 std::unique_ptr<std::map<std::string, std::shared_ptr<tenduke::json::JSONElement>>> properties;
Superclass of JSON elements.
Definition JSONElement.h:12
Type
Type of the element.
Definition JSONElement.h:17
JSON object element.
Definition JSONObject.h:16
cJSON-implementation of tenduke::json::JSONElement.
Definition CJsonElement.h:14
cJSON * element
Pointer to the cJSON element.
Definition CJsonElement.h:62
cJSON-implementation of tenduke::json::JSONObject.
Definition CJsonObject.h:15
CjsonObject(std::unique_ptr< std::map< std::string, std::shared_ptr< tenduke::json::JSONElement > > > properties, cJSON *element)
Constructs new instance.
Definition CJsonObject.h:22
std::shared_ptr< tenduke::json::JSONElement > getProperty(const std::string &propertyName) const override
Returns object property by name.
Definition CJsonObject.cpp:10
std::shared_ptr< tenduke::json::JSONElement > removeProperty(const std::string &propertyName) override
Removes property from this object.
Definition CJsonObject.cpp:33
const std::map< std::string, std::shared_ptr< tenduke::json::JSONElement > > & getProperties() const override
Returns all properties of this object.
Definition CJsonObject.cpp:28
bool hasProperty(const std::string &propertyName) const override
Checks if the object has a property with given name.
Definition CJsonObject.cpp:21
Implementation of JSON service interfaces using cJSON.
Definition CJsonArray.h:10
JSON support.
Definition JSONArray.h:10
Root for classes, functions and globals of 10Duke C++ Client.
Definition APIRequest.h:4