Package com.mastercard.developer.json
Class JsonEngine
- java.lang.Object
-
- com.mastercard.developer.json.JsonEngine
-
- Direct Known Subclasses:
GsonJsonEngine,JacksonJsonEngine,JettisonJsonEngine,JsonOrgJsonEngine,JsonSmartJsonEngine
public abstract class JsonEngine extends Object
-
-
Constructor Summary
Constructors Constructor Description JsonEngine()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddProperty(Object obj, String key, Object val)protected static ObjectasPrimitiveValue(String string)static JsonEnginegetDefault()static StringgetJsonElementKey(String jsonPathString)Get object key at the given JSON path.abstract com.jayway.jsonpath.spi.json.JsonProvidergetJsonProvider()static StringgetParentJsonPath(String jsonPathString)Get JSON path to the parent of the object at the given JSON path.Collection<String>getPropertyKeys(Object jsonElement)booleanisJsonObject(Object jsonElement)protected booleanisJsonPrimitive(Object jsonElement)booleanisNullOrEmptyJson(Object jsonElement)abstract Objectparse(String string)StringtoJsonString(Object object)
-
-
-
Method Detail
-
getJsonProvider
public abstract com.jayway.jsonpath.spi.json.JsonProvider getJsonProvider()
-
getDefault
public static JsonEngine getDefault()
-
isJsonPrimitive
protected boolean isJsonPrimitive(Object jsonElement)
-
isJsonObject
public boolean isJsonObject(Object jsonElement)
-
isNullOrEmptyJson
public boolean isNullOrEmptyJson(Object jsonElement)
-
getPropertyKeys
public Collection<String> getPropertyKeys(Object jsonElement)
-
getParentJsonPath
public static String getParentJsonPath(String jsonPathString)
Get JSON path to the parent of the object at the given JSON path.
-
-