This commit is contained in:
aozhiwei 2022-09-15 10:31:01 +08:00
parent 9b63b8fee2
commit b17543dae9
2 changed files with 10 additions and 0 deletions

View File

@ -429,6 +429,15 @@ namespace a8
}
}
void XObject::GetKeys(std::vector<std::string>& keys)
{
if (type_ == a8::XOT_OBJECT) {
for (auto& pair : *value_.object_value) {
keys.push_back(pair.first);
}
}
}
void XObject::JsonValueToXObject(Json::Value& json_val, a8::XObject& xobject)
{
Json::ValueType val_type = json_val.type();

View File

@ -56,6 +56,7 @@ namespace a8
std::string ToJsonStr();
void ToUrlEncodeStr(std::string& data);
void ToKVList(std::map<std::string, std::string>& kv_list);
void GetKeys(std::vector<std::string>& keys);
private:
void JsonValueToXObject(Json::Value& json_val, a8::XObject& xobject);