From: David ‘Bombe’ Roden Date: Sun, 24 Feb 2013 15:57:21 +0000 (+0100) Subject: Add JSON property markers. X-Git-Tag: v2~320 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=8cfb0737c3ebf95e3c77161c6e4b38aefe67e33d;p=rhynodge.git Add JSON property markers. --- diff --git a/src/main/java/net/pterodactylus/rhynodge/states/ComicState.java b/src/main/java/net/pterodactylus/rhynodge/states/ComicState.java index 89f1cdc..fc47de6 100644 --- a/src/main/java/net/pterodactylus/rhynodge/states/ComicState.java +++ b/src/main/java/net/pterodactylus/rhynodge/states/ComicState.java @@ -22,6 +22,7 @@ import java.util.List; import net.pterodactylus.rhynodge.states.ComicState.Comic; +import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.Lists; /** @@ -33,6 +34,7 @@ import com.google.common.collect.Lists; public class ComicState extends AbstractState implements Iterable { /** The comics in this state. */ + @JsonProperty private final List comics = Lists.newArrayList(); /** @@ -82,9 +84,11 @@ public class ComicState extends AbstractState implements Iterable { public static class Comic implements Iterable { /** The title of the comic. */ + @JsonProperty private final String title; /** The URLs of the comic’s images. */ + @JsonProperty private final List imageUrls = Lists.newArrayList(); /** @@ -93,7 +97,7 @@ public class ComicState extends AbstractState implements Iterable { * @param title * The title of the comic */ - public Comic(String title) { + public Comic(@JsonProperty("title") String title) { this.title = title; }