Package co.arago.util.json
Class AbstractJsonParser.Conf<T extends AbstractJsonParser.Conf<T>>
- java.lang.Object
-
- co.arago.util.json.AbstractJsonParser.Conf<T>
-
- Direct Known Subclasses:
AbstractJsonStreamParser.Conf,JsonPathParser.Conf
- Enclosing class:
- AbstractJsonParser
public abstract static class AbstractJsonParser.Conf<T extends AbstractJsonParser.Conf<T>> extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.String,java.lang.String>jsonCutsTuple of JsonPath and 'field' for completed chunk detection.protected JsonSurferTooljsonSurferTool
-
Constructor Summary
Constructors Constructor Description Conf()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description TaddJsonPath(java.lang.String jsonPath)Add a single jsonPath to parse for.TaddJsonPath(java.lang.String jsonPath, java.lang.String fieldName)Add a single jsonPath and field name to parse for.protected abstract AbstractJsonParserbuild()protected abstract Tself()TsetJsonCuts(java.util.Map<java.lang.String,java.lang.String> jsonCuts)Add jsonPaths and field names to parse for.TsetJsonSurferTool(JsonSurferTool jsonSurferTool)Set a specific JsonSurferTool.
-
-
-
Field Detail
-
jsonCuts
protected final java.util.Map<java.lang.String,java.lang.String> jsonCuts
Tuple of JsonPath and 'field' for completed chunk detection. If value it is null, use the current field name of the JSON read or just 'data' as name.
-
jsonSurferTool
protected JsonSurferTool jsonSurferTool
-
-
Method Detail
-
setJsonSurferTool
public T setJsonSurferTool(JsonSurferTool jsonSurferTool)
Set a specific JsonSurferTool.- Parameters:
jsonSurferTool- The JsonSurferTool.- Returns:
self()
-
addJsonPath
public T addJsonPath(java.lang.String jsonPath)
Add a single jsonPath to parse for.- Parameters:
jsonPath- The jsonPath- Returns:
self()
-
addJsonPath
public T addJsonPath(java.lang.String jsonPath, java.lang.String fieldName)
Add a single jsonPath and field name to parse for.- Parameters:
jsonPath- The jsonPathfieldName- Name of the field- Returns:
self()
-
setJsonCuts
public T setJsonCuts(java.util.Map<java.lang.String,java.lang.String> jsonCuts)
Add jsonPaths and field names to parse for.- Parameters:
jsonCuts- A map of jsonPaths and fieldNames.- Returns:
self()
-
self
protected abstract T self()
-
build
protected abstract AbstractJsonParser build()
-
-