Add boot sequence and multi ecu transfer
[apps/agl-service-windowmanager.git] / src / json_helper.cpp
index 72ae36a..d9cf5eb 100644 (file)
@@ -69,6 +69,18 @@ int getIntFromJson(json_object *obj, const char *key)
     return json_object_get_int(tmp);
 }
 
+double getDoubleFromJson(json_object *obj, const char *key)
+{
+    json_object *tmp;
+    if (!json_object_object_get_ex(obj, key, &tmp))
+    {
+        HMI_DEBUG("Not found key \"%s\"", key);
+        return 0;
+    }
+
+    return json_object_get_double(tmp);
+}
+
 json_bool getBoolFromJson(json_object *obj, const char *key)
 {
     json_object *tmp;