aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/traccar/notification/NotificationMessage.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/notification/NotificationMessage.java b/src/main/java/org/traccar/notification/NotificationMessage.java
index ca849385a..551a2d823 100644
--- a/src/main/java/org/traccar/notification/NotificationMessage.java
+++ b/src/main/java/org/traccar/notification/NotificationMessage.java
@@ -16,12 +16,16 @@
*/
package org.traccar.notification;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
public class NotificationMessage {
private final String subject;
private final String body;
- public NotificationMessage(String subject, String body) {
+ @JsonCreator(mode = JsonCreator.Mode.PROPERTIES)
+ public NotificationMessage(@JsonProperty("subject") String subject, @JsonProperty("body") String body) {
this.subject = subject;
this.body = body;
}