Class JSONFormatterJsonToPdxConverter
java.lang.Object
org.springframework.geode.data.json.converter.support.JSONFormatterJsonToPdxConverter
- All Implemented Interfaces:
org.springframework.core.convert.converter.Converter<String,
,org.apache.geode.pdx.PdxInstance> JsonToPdxConverter
A
JsonToPdxConverter
implementation using the Apache Geode JSONFormatter
to convert
from a JSON String
to a PdxInstance
.- Since:
- 1.3.0
- See Also:
-
JSONFormatter
PdxInstance
JsonToPdxConverter
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.geode.pdx.PdxInstance
Adapts the givenObject
as aPdxInstance
.final org.apache.geode.pdx.PdxInstance
protected org.apache.geode.pdx.PdxInstance
protected org.apache.geode.pdx.PdxInstance
convertJsonToPdx
(String json) Converts the givenJSON
toPDX
.protected JsonToObjectConverter
protected org.apache.geode.pdx.PdxInstance
jsonFormatterFromJson
(String json) protected PdxInstanceWrapper
wrap
(org.apache.geode.pdx.PdxInstance pdxInstance) Wraps the givenPdxInstance
in a new instance ofPdxInstanceWrapper
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.core.convert.converter.Converter
andThen
Methods inherited from interface org.springframework.geode.data.json.converter.JsonToPdxConverter
convert
-
Constructor Details
-
JSONFormatterJsonToPdxConverter
public JSONFormatterJsonToPdxConverter()
-
-
Method Details
-
getJsonToObjectConverter
- Returns:
- a reference to the configured
JsonToObjectConverter
; never null. - See Also:
-
convert
- Specified by:
convert
in interfaceorg.springframework.core.convert.converter.Converter<String,
org.apache.geode.pdx.PdxInstance>
-
adapt
Adapts the givenObject
as aPdxInstance
.- Parameters:
target
-Object
to adapt as PDX; must not be null.- Returns:
- a
PdxInstance
representing the givenObject
. - See Also:
-
ObjectPdxInstanceAdapter.from(Object)
PdxInstance
-
convertJsonToObjectToPdx
- Parameters:
json
-JSON
to convert into anObject
into PDX.- Returns:
- a
PdxInstance
converted from the givenJSON
. - See Also:
-
PdxInstance
getJsonToObjectConverter()
adapt(Object)
-
convertJsonToPdx
Converts the givenJSON
toPDX
.- Parameters:
json
-String
containing JSON to convert to PDX; must not be null.- Returns:
- JSON for the given
PDX
. - See Also:
-
PdxInstance
jsonFormatterFromJson(String)
wrap(PdxInstance)
-
jsonFormatterFromJson
-
wrap
Wraps the givenPdxInstance
in a new instance ofPdxInstanceWrapper
.- Parameters:
pdxInstance
-PdxInstance
to wrap.- Returns:
- a new instance of
PdxInstanceWrapper
wrapping the givenPdxInstance
. - See Also:
-