Package com.alibaba.fastjson2
Class JSONPath
java.lang.Object
com.alibaba.fastjson2.JSONPath
- Direct Known Subclasses:
JSONPathCompilerReflect.SingleNamePathTyped,JSONPathCompilerReflect.TwoNameSegmentTypedPath,JSONPathTypedMultiNamesPrefixIndex1,JSONPathTypedMultiNamesPrefixName1,JSONPathTypedMultiNamesPrefixName2
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedJSONPath(String path, JSONPath.Feature... features) -
Method Summary
Modifier and TypeMethodDescriptionvoidstatic JSONPathDeprecated.static JSONPathabstract booleanstatic booleanprotected JSONReader.Contextabstract Objectstatic Objectstatic Objectextract(byte[] jsonBytes) abstract Objectextract(JSONReader jsonReader) voidextract(JSONReader jsonReader, ValueConsumer consumer) static Objectstatic Objectextract(String json, String path, JSONPath.Feature... features) extractInt32(JSONReader jsonReader) intextractInt32Value(JSONReader jsonReader) extractInt64(JSONReader jsonReader) longextractInt64Value(JSONReader jsonReader) abstract StringextractScalar(JSONReader jsonReader) voidextractScalar(JSONReader jsonReader, ValueConsumer consumer) booleanabstract booleanisRef()static JSONPathstatic JSONPathcreate multi-path jsonpathstatic JSONPathof(String[] paths, Type[] types, JSONReader.Feature... features) create multi-path jsonpathstatic JSONPathof(String[] paths, Type[] types, String[] formats, long[] pathFeatures, ZoneId zoneId, JSONReader.Feature... features) create multi-path jsonpathstatic JSONPathof(String path, JSONPath.Feature... features) static JSONPathabstract booleanstatic voidstatic Stringabstract voidabstract voidset(Object object, Object value, JSONReader.Feature... readerFeatures) static Objectstatic Stringstatic ObjectsetCallback(Object rootObject, String path, BiFunction callback) static ObjectsetCallback(Object rootObject, String path, Function callback) abstract voidsetCallback(Object object, BiFunction callback) voidsetCallback(Object object, Function callback) abstract voidabstract voidsetReaderContext(JSONReader.Context context) setWriterContext(JSONWriter.Context writerContext) final StringtoString()
-
Constructor Details
-
JSONPath
-
JSONPath
-
-
Method Details
-
isPrevious
public boolean isPrevious() -
toString
-
extract
-
extract
-
eval
-
eval
-
set
-
contains
-
set
-
setCallback
-
setCallback
-
remove
-
remove
-
paths
-
isRef
public abstract boolean isRef() -
arrayAdd
-
contains
-
eval
-
createContext
-
extract
-
extract
-
extract
-
extract
-
extractScalar
-
getReaderContext
-
setReaderContext
-
getWriterContext
-
setWriterContext
-
set
-
set
-
setCallback
-
setCallback
-
setInt
-
setLong
-
remove
-
extract
-
extractScalar
-
extractInt64
-
extractInt64Value
-
extractInt32
-
extractInt32Value
-
compile
Deprecated. -
compile
-
of
-
of
-
of
create multi-path jsonpath- Parameters:
paths- jsonpath arraytypes- item types- Since:
- 2.0.20
-
of
create multi-path jsonpath- Parameters:
paths- jsonpath arraytypes- item types- Since:
- 2.0.20
-
of
public static JSONPath of(String[] paths, Type[] types, String[] formats, long[] pathFeatures, ZoneId zoneId, JSONReader.Feature... features) create multi-path jsonpath- Parameters:
paths- jsonpath arraytypes- item typesformats- item formatzoneId- zonedIdfeatures- parse use JSONReader.Features- Since:
- 2.0.20
-
of
-