RDK Documentation (Open Sourced RDK Components)
MockAampJsonObject Class Reference
Inheritance diagram for MockAampJsonObject:
Inheritance graph
Collaboration diagram for MockAampJsonObject:
Collaboration graph

Public Member Functions

 MOCK_METHOD (bool, add,(const std::string &name, const std::string &value, const ENCODING encoding))
 
 MOCK_METHOD (bool, add,(const std::string &name, const char *value, const ENCODING encoding))
 
 MOCK_METHOD (bool, add,(const std::string &name, const std::vector< std::string > &values))
 
 MOCK_METHOD (bool, add,(const std::string &name, const std::vector< uint8_t > &values, const ENCODING encoding))
 
 MOCK_METHOD (bool, add,(const std::string &name, AampJsonObject &value))
 
 MOCK_METHOD (bool, add,(const std::string &name, std::vector< AampJsonObject * > &values))
 
 MOCK_METHOD (bool, add,(const std::string &name, cJSON *value))
 
 MOCK_METHOD (bool, add,(const std::string &name, bool value))
 
 MOCK_METHOD (bool, add,(const std::string &name, int value))
 
 MOCK_METHOD (bool, add,(const std::string &name, long value))
 
 MOCK_METHOD (bool, add,(const std::string &name, double value))
 
 MOCK_METHOD (bool, set,(AampJsonObject *parent, cJSON *object))
 
 MOCK_METHOD (bool, get,(const std::string &name, AampJsonObject &value))
 
 MOCK_METHOD (bool, get,(const std::string &name, std::string &value))
 
 MOCK_METHOD (bool, get,(const std::string &name, int &value))
 
 MOCK_METHOD (bool, get,(const std::string &name, std::vector< std::string > &values))
 
 MOCK_METHOD (bool, get,(const std::string &name, std::vector< uint8_t > &values, const ENCODING encoding))
 
- Public Member Functions inherited from AampJsonObject
 AampJsonObject (const std::string &jsonStr)
 
 AampJsonObject (const char *jsonStr)
 
 AampJsonObject (const AampJsonObject &)=delete
 
AampJsonObjectoperator= (const AampJsonObject &)=delete
 
bool add (const std::string &name, const std::string &value, const ENCODING encoding=ENCODING_STRING)
 Add a string value.
 
bool add (const std::string &name, const char *value, const ENCODING encoding=ENCODING_STRING)
 Add a string value.
 
bool add (const std::string &name, const std::vector< std::string > &values)
 Add a vector of string values as a JSON array.
 
bool add (const std::string &name, const std::vector< uint8_t > &values, const ENCODING encoding=ENCODING_STRING)
 Add the provided bytes after encoding in the specified encoding.
 
bool add (const std::string &name, std::vector< AampJsonObject * > &values)
 Add a vector of string values as a JSON array.
 
bool get (const std::string &name, std::vector< std::string > &values)
 Get a string value.
 
bool get (const std::string &name, int &value)
 Get a int value from a JSON data.
 
bool get (const std::string &name, std::string &value)
 Get a string value.
 
bool get (const std::string &name, std::vector< uint8_t > &values, const ENCODING encoding=ENCODING_STRING)
 Get a string value as a vector of bytes.
 
bool get (const std::string &name, AampJsonObject &value)
 Get the AampJson object from json data within the Json data.
 
std::string print ()
 Print the constructed JSON to a string. More...
 
std::string print_UnFormatted ()
 Print the constructed JSON to a string. More...
 
void print (std::vector< uint8_t > &data)
 Print the constructed JSON into the provided vector.
 
bool add (const std::string &name, bool value)
 Add a bool value.
 
bool add (const std::string &name, int value)
 Add a int value.
 
bool add (const std::string &name, double value)
 Add a double value.
 
bool add (const std::string &name, long value)
 Add a long value.
 
bool add (const std::string &name, AampJsonObject &value)
 Add a vector of AampJsonObject as a JSON array.
 
bool add (const std::string &name, cJSON *value)
 Add a cJSON value.
 
bool isArray (const std::string &name)
 Check whether the value is Array or not. More...
 
bool isString (const std::string &name)
 Check whether the value is String or not. More...
 
bool isNumber (const std::string &name)
 Check whether the value is Number or not. More...
 
bool isObject (const std::string &name)
 Check whether the value is Object or not. More...
 

Additional Inherited Members

- Public Types inherited from AampJsonObject
enum  ENCODING
 

yes

Definition at line 25 of file MockAampJsonObject.h.


The documentation for this class was generated from the following file: