1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #if !defined( __REQUESTBASE_HPP_)
- #define __REQUESTBASE_HPP_
- #include <iostream>
- #include <rapidjson/document.h>
- #include <rapidjson/rapidjson.h>
- #include <rapidjson/stringbuffer.h>
- #include <rapidjson/writer.h>
- namespace gsd
- {
- class RequestBase
- {
- public:
- RequestBase();
- ~RequestBase();
- /**
- * @description: JsonToObject
- * @param {string} &json
- * @return {*}
- */
- virtual bool JsonToObject(std::string &json) = 0;
- /**
- * @description: ObjectToJson
- * @param {string&} str
- * @return {*}
- */
- virtual void ObjectToJson(std::string& str) = 0;
- /**
- * @description: ObjectToJson
- * @return {*}
- */
- virtual void ObjectToJson(rapidjson::Writer<rapidjson::StringBuffer>& writer) = 0;
- };
- } // namespace gsd
- #endif // __REQUESTBASE_HPP_
|