mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-26 04:31:37 +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;
|
||||
if (obj.isObject()) {
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user