From 5194dda39cbe7815da9946e0e6822ddc5d27ad3d Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 18 Nov 2015 10:49:40 +1300 Subject: Ignore null values in json object --- src/org/traccar/web/JsonConverter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/org/traccar/web') diff --git a/src/org/traccar/web/JsonConverter.java b/src/org/traccar/web/JsonConverter.java index b19894dd6..c01ce8bd6 100644 --- a/src/org/traccar/web/JsonConverter.java +++ b/src/org/traccar/web/JsonConverter.java @@ -66,7 +66,7 @@ public final class JsonConverter { final String name = Introspector.decapitalize(method.getName().substring(3)); Class parameterType = method.getParameterTypes()[0]; - if (json.containsKey(name)) { + if (json.containsKey(name) && !json.isNull(name)) { try { if (parameterType.equals(boolean.class)) { method.invoke(object, json.getBoolean(name)); -- cgit v1.2.3