Change-Id: Id256156f8ef0ff110da38472535c6c94378ce22b
Signed-off-by: Lukasz Bardeli <l.bardeli@samsung.com>
value = common::stol(
FromJson<std::string>(JsonCast<JsonObject>(match_value), "uid"));
} else {
- value = common::stol(JsonCast<std::string>(match_value));
+ if (match_value.is<std::string>()) {
+ value = common::stol(JsonCast<std::string>(match_value));
+ } else if (match_value.is<double>()) {
+ value = static_cast<int>(match_value.get<double>());
+ } else {
+ return PlatformResult(ErrorCode::INVALID_VALUES_ERR,
+ "Match value wrong type");
+ }
}
if (value < 0) {
return LogAndCreateResult(