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 void
addProperty(Object obj, String key, Object val)
protected static Object
asPrimitiveValue(String string)
static JsonEngine
getDefault()
static String
getJsonElementKey(String jsonPathString)
Get object key at the given JSON path.abstract com.jayway.jsonpath.spi.json.JsonProvider
getJsonProvider()
static String
getParentJsonPath(String jsonPathString)
Get JSON path to the parent of the object at the given JSON path.Collection<String>
getPropertyKeys(Object jsonElement)
boolean
isJsonObject(Object jsonElement)
protected boolean
isJsonPrimitive(Object jsonElement)
boolean
isNullOrEmptyJson(Object jsonElement)
abstract Object
parse(String string)
String
toJsonString(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.
-
-