diff options
Diffstat (limited to 'src/org/traccar/http')
-rw-r--r-- | src/org/traccar/http/JsonConverter.java | 3 | ||||
-rw-r--r-- | src/org/traccar/http/JsonIgnore.java | 12 |
2 files changed, 13 insertions, 2 deletions
diff --git a/src/org/traccar/http/JsonConverter.java b/src/org/traccar/http/JsonConverter.java index eb672da8d..d658ef7d6 100644 --- a/src/org/traccar/http/JsonConverter.java +++ b/src/org/traccar/http/JsonConverter.java @@ -31,7 +31,6 @@ import javax.json.JsonObject; import javax.json.JsonObjectBuilder; import javax.json.JsonValue; -import org.traccar.helper.IgnoreOnSerialization; import org.traccar.model.Factory; public class JsonConverter { @@ -106,7 +105,7 @@ public class JsonConverter { Method[] methods = object.getClass().getMethods(); for (Method method : methods) { - if(method.isAnnotationPresent(IgnoreOnSerialization.class)) { + if(method.isAnnotationPresent(JsonIgnore.class)) { continue; } if (method.getName().startsWith("get") && method.getParameterTypes().length == 0) { diff --git a/src/org/traccar/http/JsonIgnore.java b/src/org/traccar/http/JsonIgnore.java new file mode 100644 index 000000000..ad7791e0d --- /dev/null +++ b/src/org/traccar/http/JsonIgnore.java @@ -0,0 +1,12 @@ +package org.traccar.http; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +import static java.lang.annotation.ElementType.METHOD; + +@Retention(RetentionPolicy.RUNTIME) +@Target(value = {METHOD}) +public @interface JsonIgnore { +} |