Class JsonDocumentReader
- java.lang.Object
-
- org.uitnet.testing.smartfwk.api.core.reader.JsonDocumentReader
-
public class JsonDocumentReader extends Object
- Author:
- Madhav Krishna
-
-
Field Summary
Fields Modifier and Type Field Description protected com.jayway.jsonpath.DocumentContextjsonDocCtx
-
Constructor Summary
Constructors Constructor Description JsonDocumentReader(File jsonFilePath, boolean updateSystemVariablesValue)JsonDocumentReader(String jsonAsString, boolean updateSystemVariablesValue)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.fasterxml.jackson.databind.ObjectMappercreateObjectMapper()com.jayway.jsonpath.DocumentContextgetDocumentContext()protected voidinit()static voidmain(String[] args)com.jayway.jsonpath.DocumentContextprepareDocumentContext(Object obj)<T> TreadSingleValue(String jsonPath)<T> TreadValueAsObject(String yamlPath, Class<T> clazz)<T> List<T>readValuesAsList(String jsonPath)<T> Set<T>readValuesAsSet(String jsonPath)
-
-
-
Method Detail
-
prepareDocumentContext
public com.jayway.jsonpath.DocumentContext prepareDocumentContext(Object obj)
-
getDocumentContext
public com.jayway.jsonpath.DocumentContext getDocumentContext()
-
readSingleValue
public <T> T readSingleValue(String jsonPath)
-
createObjectMapper
protected com.fasterxml.jackson.databind.ObjectMapper createObjectMapper()
-
init
protected void init()
-
main
public static void main(String[] args)
-
-