Spring Boot for VMware GemFire
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:
-
JSONFormatterPdxInstanceJsonToPdxConverter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.geode.pdx.PdxInstanceAdapts the givenObjectas aPdxInstance.final org.apache.geode.pdx.PdxInstanceprotected org.apache.geode.pdx.PdxInstanceprotected org.apache.geode.pdx.PdxInstanceconvertJsonToPdx(String json) Converts the givenJSONtoPDX.protected JsonToObjectConverterprotected org.apache.geode.pdx.PdxInstancejsonFormatterFromJson(String json) protected PdxInstanceWrapperwrap(org.apache.geode.pdx.PdxInstance pdxInstance) Wraps the givenPdxInstancein a new instance ofPdxInstanceWrapper.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.core.convert.converter.Converter
andThenMethods 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:
convertin interfaceorg.springframework.core.convert.converter.Converter<String,org.apache.geode.pdx.PdxInstance>
-
adapt
Adapts the givenObjectas aPdxInstance.- Parameters:
target-Objectto adapt as PDX; must not be null.- Returns:
- a
PdxInstancerepresenting the givenObject. - See Also:
-
ObjectPdxInstanceAdapter.from(Object)PdxInstance
-
convertJsonToObjectToPdx
- Parameters:
json-JSONto convert into anObjectinto PDX.- Returns:
- a
PdxInstanceconverted from the givenJSON. - See Also:
-
PdxInstancegetJsonToObjectConverter()adapt(Object)
-
convertJsonToPdx
Converts the givenJSONtoPDX.- Parameters:
json-Stringcontaining JSON to convert to PDX; must not be null.- Returns:
- JSON for the given
PDX. - See Also:
-
PdxInstancejsonFormatterFromJson(String)wrap(PdxInstance)
-
jsonFormatterFromJson
-
wrap
Wraps the givenPdxInstancein a new instance ofPdxInstanceWrapper.- Parameters:
pdxInstance-PdxInstanceto wrap.- Returns:
- a new instance of
PdxInstanceWrapperwrapping the givenPdxInstance. - See Also:
-