From 763e71486aa51900de47a20fbbe2c5b0bf6193c5 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 15 Sep 2017 03:19:29 +0300 Subject: core: fix tags deserialization --- juick-core/src/main/java/com/juick/Tag.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'juick-core/src/main/java') diff --git a/juick-core/src/main/java/com/juick/Tag.java b/juick-core/src/main/java/com/juick/Tag.java index 7f839242..29e5c767 100644 --- a/juick-core/src/main/java/com/juick/Tag.java +++ b/juick-core/src/main/java/com/juick/Tag.java @@ -18,10 +18,7 @@ package com.juick; import com.fasterxml.jackson.annotation.JsonValue; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlValue; +import javax.xml.bind.annotation.*; import java.util.Comparator; import java.util.Objects; @@ -29,11 +26,14 @@ import java.util.Objects; * @author Ugnich Anton */ @XmlRootElement(name = "tag", namespace = "http://juick.com/message") -@XmlAccessorType(XmlAccessType.PROPERTY) +@XmlAccessorType(XmlAccessType.FIELD) public class Tag implements Comparable { + @XmlValue private String name; + @XmlTransient public int TID = 0; + @XmlTransient public int SynonymID = 0; public Tag() { @@ -50,7 +50,7 @@ public class Tag implements Comparable { (o instanceof Tag) && Objects.equals(name, ((Tag) o).name); } - @XmlValue + @XmlTransient @JsonValue public String getName() { return name; -- cgit v1.2.3