mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
on_publish hook兼容非标准回复
This commit is contained in:
parent
5bc0f306b7
commit
7d251e15b3
@ -296,7 +296,12 @@ static mINI jsonToMini(const Value &obj) {
|
|||||||
mINI ret;
|
mINI ret;
|
||||||
if (obj.isObject()) {
|
if (obj.isObject()) {
|
||||||
for (auto it = obj.begin(); it != obj.end(); ++it) {
|
for (auto it = obj.begin(); it != obj.end(); ++it) {
|
||||||
ret[it.name()] = (*it).asString();
|
try {
|
||||||
|
auto str = (*it).asString();
|
||||||
|
ret[it.name()] = std::move(str);
|
||||||
|
} catch (std::exception &) {
|
||||||
|
WarnL << "Json is not convertible to string, key: " << it.name() << ", value: " << (*it);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user