diff options
author | Eduardo Pedroni <e.pedroni91@gmail.com> | 2016-08-21 01:14:38 +0200 |
---|---|---|
committer | Eduardo Pedroni <e.pedroni91@gmail.com> | 2016-08-21 01:14:38 +0200 |
commit | 3a25d47f187fe7499d2d481d9a0a3411a92bfa11 (patch) | |
tree | 40ee4efedd0bcbd29aa0ec8e5cb3c8e11af9e26e /src/eu/equalparts | |
parent | 7f80ab416a708e5c31116b9af7295af673d116d7 (diff) |
Switched from ant to gradle, had to refactor some of the tests because of the new build structure, a bit ugly but should pass
Diffstat (limited to 'src/eu/equalparts')
-rw-r--r-- | src/eu/equalparts/cardbase/card/CardSetInformation.java | 8 | ||||
-rw-r--r-- | src/eu/equalparts/cardbase/json/FullCardSetDeserializer.java | 8 |
2 files changed, 9 insertions, 7 deletions
diff --git a/src/eu/equalparts/cardbase/card/CardSetInformation.java b/src/eu/equalparts/cardbase/card/CardSetInformation.java index a01c18d..d57015c 100644 --- a/src/eu/equalparts/cardbase/card/CardSetInformation.java +++ b/src/eu/equalparts/cardbase/card/CardSetInformation.java @@ -1,10 +1,12 @@ package eu.equalparts.cardbase.card; +import com.fasterxml.jackson.annotation.JsonProperty; + public class CardSetInformation { - private String name; - private String code; - private String releaseDate; + @JsonProperty private String name; + @JsonProperty private String code; + @JsonProperty private String releaseDate; /** * @return the set's name. diff --git a/src/eu/equalparts/cardbase/json/FullCardSetDeserializer.java b/src/eu/equalparts/cardbase/json/FullCardSetDeserializer.java index 73034a0..c493df4 100644 --- a/src/eu/equalparts/cardbase/json/FullCardSetDeserializer.java +++ b/src/eu/equalparts/cardbase/json/FullCardSetDeserializer.java @@ -45,7 +45,7 @@ public class FullCardSetDeserializer extends StdDeserializer<FullCardSet> { if (jsonTree.hasNonNull("name")) { fcs.name = jsonTree.get("name").asText(); } else { - throw new JsonMappingException("Field \"name\" not found."); + throw new JsonMappingException(jp, "Field \"name\" not found."); } String setCode; @@ -53,13 +53,13 @@ public class FullCardSetDeserializer extends StdDeserializer<FullCardSet> { setCode = jsonTree.get("code").asText(); fcs.code = setCode; } else { - throw new JsonMappingException("Field \"code\" not found."); + throw new JsonMappingException(jp, "Field \"code\" not found."); } if (jsonTree.hasNonNull("releaseDate")) { fcs.releaseDate = jsonTree.get("releaseDate").asText(); } else { - throw new JsonMappingException("Field \"releaseDate\" not found."); + throw new JsonMappingException(jp, "Field \"releaseDate\" not found."); } if (jsonTree.hasNonNull("cards")) { @@ -74,7 +74,7 @@ public class FullCardSetDeserializer extends StdDeserializer<FullCardSet> { } fcs.cards = cardMap; } else { - throw new JsonMappingException("Field \"cards\" not found."); + throw new JsonMappingException(jp, "Field \"cards\" not found."); } /* |