Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Added JsonCreator to email Recipient

Rich Turner305bd5251326
diff --git a/model/src/main/java/org/openremote/model/notification/EmailNotificationMessage.java b/model/src/main/java/org/openremote/model/notification/EmailNotificationMessage.java
index 50d0f282f..864c30053 100644
--- a/model/src/main/java/org/openremote/model/notification/EmailNotificationMessage.java
+++ b/model/src/main/java/org/openremote/model/notification/EmailNotificationMessage.java
@@ -19,6 +19,8 @@
*/
package org.openremote.model.notification;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
import org.openremote.model.util.TextUtil;
import org.openremote.model.value.ArrayValue;
import org.openremote.model.value.ObjectValue;
@@ -40,7 +42,8 @@ public class EmailNotificationMessage extends AbstractNotificationMessage {
this(null, address);
}
- public Recipient(String name, String address) {
+ @JsonCreator
+ public Recipient(@JsonProperty("name") String name, @JsonProperty("address") String address) {
this.name = name;
this.address = address;
}