Fixing framework.

This commit is contained in:
stephb9959
2022-04-04 07:52:27 -07:00
parent d05aec1276
commit 2904d7c258

View File

@@ -324,12 +324,12 @@ namespace OpenWifi::RESTAPI_utils {
inline void field_from_json(const Poco::JSON::Object::Ptr &Obj, const char *Field, double & Value) { inline void field_from_json(const Poco::JSON::Object::Ptr &Obj, const char *Field, double & Value) {
if(Obj->has(Field) && !Obj->isNull(Field)) if(Obj->has(Field) && !Obj->isNull(Field))
Value = Obj->get(Field).extract<double>(); Value = (double) Obj->get(Field);
} }
inline void field_from_json(const Poco::JSON::Object::Ptr &Obj, const char *Field, float & Value) { inline void field_from_json(const Poco::JSON::Object::Ptr &Obj, const char *Field, float & Value) {
if(Obj->has(Field) && !Obj->isNull(Field)) if(Obj->has(Field) && !Obj->isNull(Field))
Value = (float) Obj->get(Field).extract<double>(); Value = (float) Obj->get(Field);
} }
inline void field_from_json(const Poco::JSON::Object::Ptr &Obj, const char *Field, bool &Value) { inline void field_from_json(const Poco::JSON::Object::Ptr &Obj, const char *Field, bool &Value) {