X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fajax%2FJsonReturnObject.java;h=ca29f3c1b4a557995827d58e16ec7883a79d6955;hp=61616160b36b743edb609806d7009d7c5d9bb014;hb=924578ceaf81c975fed9360593de93ad185f1c8b;hpb=c842faebb65eb5210de8f6a2d0be85307d0c163f 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 //