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;
private final boolean success;
/** The returned values. */
- @JsonUnwrapped
private final Map<String, JsonNode> content = Maps.newHashMap();
/**
return content.get(key);
}
+ /**
+ * Returns the content of this object for serialization.
+ *
+ * @return The content of this object
+ */
+ @JsonAnyGetter
+ public Map<String, JsonNode> getContent() {
+ return content;
+ }
+
//
// ACTIONS
//
return this;
}
+ @Override
+ public int hashCode() {
+ return Boolean.valueOf(success).hashCode() ^ content.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object object) {
+ if ((object == null) || (object.getClass() != getClass())) {
+ return false;
+ }
+ JsonReturnObject other = (JsonReturnObject) object;
+ return (success == other.success) && content.equals(other.content);
+ }
+
}