public abstract class CrossrefDeserializer<T>
extends <any>
Modifier and Type | Field and Description |
---|---|
protected ObjectMapper |
mapper |
protected SimpleModule |
module |
Constructor and Description |
---|
CrossrefDeserializer() |
Modifier and Type | Method and Description |
---|---|
java.util.List<T> |
deserialize(JsonParser parser,
DeserializationContext context) |
protected abstract T |
deserializeOneItem(JsonNode item)
Describe how to deserialize one json item from response
|
protected ArrayNode |
normalizeResults(JsonParser parser)
Normalize results to get always an object list even if you fetch only one object.
|
java.util.List<T> |
parse(java.lang.String body)
Parse a json String, usually the response body.
|
protected abstract T deserializeOneItem(JsonNode item)
public java.util.List<T> parse(java.lang.String body) throws JsonParseException, JsonMappingException, java.io.IOException
JsonParseException
JsonMappingException
java.io.IOException
protected ArrayNode normalizeResults(JsonParser parser) throws java.io.IOException
java.io.IOException
public java.util.List<T> deserialize(JsonParser parser, DeserializationContext context) throws java.io.IOException, JsonProcessingException
java.io.IOException
JsonProcessingException