From 30fc032b520cc28c61e3e6ec776bfe2a5124eaa5 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 30 Jun 2017 13:17:45 +0300 Subject: core: fix DeviceRegistration deserealization --- juick-core/src/main/java/com/juick/DeviceRegistration.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'juick-core') diff --git a/juick-core/src/main/java/com/juick/DeviceRegistration.java b/juick-core/src/main/java/com/juick/DeviceRegistration.java index 9b6f1d4b..b6d57d35 100644 --- a/juick-core/src/main/java/com/juick/DeviceRegistration.java +++ b/juick-core/src/main/java/com/juick/DeviceRegistration.java @@ -1,5 +1,8 @@ package com.juick; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + /** * Created by vitalyster on 22.11.2016. */ @@ -7,7 +10,8 @@ public class DeviceRegistration { private String type; private String token; - public DeviceRegistration(String type, String token) { + @JsonCreator + public DeviceRegistration(@JsonProperty("type") String type, @JsonProperty("token") String token) { this.type = type; this.token = token; } -- cgit v1.2.3