From 8cfb0737c3ebf95e3c77161c6e4b38aefe67e33d Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sun, 24 Feb 2013 16:57:21 +0100 Subject: [PATCH] Add JSON property markers. --- src/main/java/net/pterodactylus/rhynodge/states/ComicState.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; } -- 2.7.4