public class JacksonJsonToPdxConverter extends java.lang.Object implements JsonToPdxArrayConverter
JacksonJsonToPdxConverter
class is an implementation of the JsonToPdxArrayConverter
that is
capable of converting an array of JSON objects into an array of PdxInstances
.JsonNode
,
ObjectMapper
,
ArrayNode
,
ObjectNode
,
PdxInstance
,
JsonToPdxArrayConverter
,
JsonToPdxConverter
Constructor and Description |
---|
JacksonJsonToPdxConverter() |
Modifier and Type | Method and Description |
---|---|
org.apache.geode.pdx.PdxInstance[] |
convert(java.lang.String json)
Converts the given
JSON containing multiple objects into an array of PdxInstance objects. |
protected JsonToPdxConverter |
getJsonToPdxConverter()
Returns a reference to the configured
JsonToPdxConverter used to convert from a single object,
JSON String to PDX (i.e. |
protected com.fasterxml.jackson.databind.ObjectMapper |
getObjectMapper()
Returns a reference to the configured Jackson
ObjectMapper . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
convert
@NonNull protected JsonToPdxConverter getJsonToPdxConverter()
JsonToPdxConverter
used to convert from a single object,
JSON String
to PDX (i.e. as a PdxInstance
.JsonToPdxConverter
; never null.JsonToPdxConverter
@NonNull protected com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
ObjectMapper
.ObjectMapper
; never null.ObjectMapper
@Nullable public org.apache.geode.pdx.PdxInstance[] convert(java.lang.String json)
JSON
containing multiple objects into an array of PdxInstance
objects.convert
in interface org.springframework.core.convert.converter.Converter<java.lang.String,org.apache.geode.pdx.PdxInstance[]>
json
- JSON
data to convert.PdxInstance
objects from the given JSON
.java.lang.IllegalStateException
- if the JSON
does not start with
either a JSON array or a JSON object.PdxInstance