public class JSONFormatterJsonToPdxConverter extends java.lang.Object implements JsonToPdxConverter
JsonToPdxConverter
implementation using the Apache Geode JSONFormatter
to convert
from a JSON String
to a PdxInstance
.JSONFormatter
,
PdxInstance
,
JsonToPdxConverter
Constructor and Description |
---|
JSONFormatterJsonToPdxConverter() |
Modifier and Type | Method and Description |
---|---|
protected org.apache.geode.pdx.PdxInstance |
adapt(java.lang.Object target)
Adapts the given
Object as a PdxInstance . |
org.apache.geode.pdx.PdxInstance |
convert(java.lang.String json) |
protected org.apache.geode.pdx.PdxInstance |
convertJsonToObjectToPdx(java.lang.String json)
Converts the given
JSON into a Object and then adapts the Object
as a PdxInstance . |
protected org.apache.geode.pdx.PdxInstance |
convertJsonToPdx(java.lang.String json)
Converts the given
JSON to PDX . |
protected JsonToObjectConverter |
getJsonToObjectConverter()
|
protected org.apache.geode.pdx.PdxInstance |
jsonFormatterFromJson(java.lang.String json)
Converts
JSON into PDX using JSONFormatter.fromJSON(String) . |
protected PdxInstanceWrapper |
wrap(org.apache.geode.pdx.PdxInstance pdxInstance)
Wraps the given
PdxInstance in a new instance of PdxInstanceWrapper . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
convert
@NonNull protected JsonToObjectConverter getJsonToObjectConverter()
JsonToObjectConverter
; never null.JsonToObjectConverter
@NonNull public final org.apache.geode.pdx.PdxInstance convert(@NonNull java.lang.String json)
convert
in interface org.springframework.core.convert.converter.Converter<java.lang.String,org.apache.geode.pdx.PdxInstance>
@NonNull protected org.apache.geode.pdx.PdxInstance adapt(@NonNull java.lang.Object target)
Object
as a PdxInstance
.target
- Object
to adapt as PDX; must not be null.PdxInstance
representing the given Object
.ObjectPdxInstanceAdapter.from(Object)
,
PdxInstance
@NonNull protected org.apache.geode.pdx.PdxInstance convertJsonToObjectToPdx(@NonNull java.lang.String json)
JSON
into a Object
and then adapts the Object
as a PdxInstance
.json
- JSON
to convert into an Object
into PDX.PdxInstance
converted from the given JSON
.PdxInstance
,
getJsonToObjectConverter()
,
adapt(Object)
@NonNull protected org.apache.geode.pdx.PdxInstance convertJsonToPdx(@NonNull java.lang.String json)
JSON
to PDX
.json
- String
containing JSON to convert to PDX; must not be null.PDX
.PdxInstance
,
jsonFormatterFromJson(String)
,
wrap(PdxInstance)
@NonNull protected org.apache.geode.pdx.PdxInstance jsonFormatterFromJson(@NonNull java.lang.String json)
JSON
into PDX
using JSONFormatter.fromJSON(String)
.json
- JSON
to convert to PDX
; must not be null.PDX
generated from the given, required JSON
; never null.JSONFormatter.fromJSON(String)
,
PdxInstance
@NonNull protected PdxInstanceWrapper wrap(@NonNull org.apache.geode.pdx.PdxInstance pdxInstance)
PdxInstance
in a new instance of PdxInstanceWrapper
.pdxInstance
- PdxInstance
to wrap.PdxInstanceWrapper
wrapping the given PdxInstance
.PdxInstanceWrapper.from(PdxInstance)
,
PdxInstanceWrapper
,
PdxInstance