I'm trying to parse Json object to a Java object but i'm having issues with one of its keys. This is the key i'm trying to parse:
"formats":{"application/x-mobipocket-ebook":"http://www.gutenberg.org/ebooks/84.kindle.images",
"text/plain; charset=utf-8":"http://www.gutenberg.org/files/84/84-0.zip",
"text/html; charset=utf-8":"http://www.gutenberg.org/files/84/84-h/84-h.htm",
"application/rdf+xml":"http://www.gutenberg.org/ebooks/84.rdf",
"application/epub+zip":"http://www.gutenberg.org/ebooks/84.epub.images",
"application/zip":"http://www.gutenberg.org/files/84/84-h.zip",
"image/jpeg":"http://www.gutenberg.org/cache/epub/84/pg84.cover.small.jpg"}
So i have the Java class like this:
public class Format {
@JsonProperty("application/x-mobipocket-ebook")
private String ebook;
@JsonProperty("text/plain; charset=utf-8")
private String textPlain;
@JsonProperty("text/html; charset=utf-8")
private String textHtml;
@JsonProperty("application/rdf+xml")
private String textXml;
@JsonProperty("application/epub+zip")
private String epubZip;
@JsonProperty("application/zip")
private String zip;
@JsonProperty("image/jpeg")
private String image;
//getters, setters and toString..
}
I'm getting the result of the other keys (its just a json object with name, author, etc) without problems but with this key i'm getting null. How could i get this information properly then? (I've looking for a while now but other answers didn't work)