From 924578ceaf81c975fed9360593de93ad185f1c8b Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 9 Jul 2013 23:21:57 +0200 Subject: [PATCH] Fix unwrapping of the content map. --- .../net/pterodactylus/sone/web/ajax/JsonReturnObject.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/pterodactylus/sone/web/ajax/JsonReturnObject.java b/src/main/java/net/pterodactylus/sone/web/ajax/JsonReturnObject.java index 6161616..ca29f3c 100644 --- a/src/main/java/net/pterodactylus/sone/web/ajax/JsonReturnObject.java +++ b/src/main/java/net/pterodactylus/sone/web/ajax/JsonReturnObject.java @@ -6,8 +6,8 @@ package net.pterodactylus.sone.web.ajax; import java.util.Map; +import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonUnwrapped; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.BooleanNode; import com.fasterxml.jackson.databind.node.IntNode; @@ -27,7 +27,6 @@ public class JsonReturnObject { private final boolean success; /** The returned values. */ - @JsonUnwrapped private final Map content = Maps.newHashMap(); /** @@ -67,6 +66,16 @@ public class JsonReturnObject { return content.get(key); } + /** + * Returns the content of this object for serialization. + * + * @return The content of this object + */ + @JsonAnyGetter + public Map getContent() { + return content; + } + // // ACTIONS // -- 2.7.4