|
10Duke Enterprise C++ Client
|
#include <JSONObject.h>
JSON object element.
Public Member Functions | |
| virtual std::shared_ptr< JSONElement > | getProperty (const std::string &propertyName) const =0 |
| Returns object property by name. | |
| virtual bool | hasProperty (const std::string &propertyName) const =0 |
| Checks if the object has a property with given name. | |
| 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. | |
Public Member Functions inherited from tenduke::json::JSONElement | |
| virtual enum Type | getType () const =0 |
| Returns type of this element. | |
| virtual std::string | asJSON () const =0 |
| Serializes the element as JSON. | |
| virtual std::string | asString () const =0 |
| Gets the value of the element as a string. | |
| bool | isArray () const |
| Utility to check if this element is JSONArray. | |
| bool | isBoolean () const |
| Utility to check if this element is JSONBoolean. | |
| bool | isNull () const |
| Utility to check if this element is null. | |
| bool | isNumber () const |
| Utility to check if this element is JSONNumber. | |
| bool | isObject () const |
| Utility to check if this element is JSONObject. | |
| bool | isString () const |
| Utility to check if this element is JSONString. | |
| bool | isUndefined () const |
| Utility to check if this element is undefined. | |
Additional Inherited Members | |
Public Types inherited from tenduke::json::JSONElement | |
| enum | Type { UNDEFINED , NULLISH , OBJECT , ARRAY , NUMBER , STRING , BOOLEAN } |
| Type of the element. | |
Static Public Member Functions inherited from tenduke::json::JSONElement | |
| static std::string | typeToString (const enum Type type) |
| Converts the type to string. | |
|
pure virtual |
Returns all properties of this object.
Implemented in SimpleJSONObject, tenduke::json::cjson::CjsonObject, and tenduke::json::SimpleJSONObject.
|
pure virtual |
Returns object property by name.
| propertyName | - |
null if no such property. Implemented in SimpleJSONObject, tenduke::json::cjson::CjsonObject, and tenduke::json::SimpleJSONObject.
|
pure virtual |
Checks if the object has a property with given name.
| propertyName | - |
true if the object contains property with given name Implemented in SimpleJSONObject, tenduke::json::cjson::CjsonObject, and tenduke::json::SimpleJSONObject.
|
pure virtual |
Removes property from this object.
| propertyName | - |
Implemented in SimpleJSONObject, tenduke::json::cjson::CjsonObject, and tenduke::json::SimpleJSONObject.