public class NestedPathFinder extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
JQ_PATH_ROOT |
static String |
JSON_PATH_ROOT |
| Constructor and Description |
|---|
NestedPathFinder() |
| Modifier and Type | Method and Description |
|---|---|
static Object |
find(Object data,
List<NestedPathPart> path)
Dig through a thing to find stuff
|
static Object[] |
findKeys(Object data,
List<NestedPathPart> path)
find the list of 'keys' at some path.
|
static List<NestedPathPart> |
parseJqPath(String path)
split a jq path into a series of extractors to find things in stuff
|
static List<NestedPathPart> |
parseJsonPath(String path)
split a JSONPath path into a series of extractors to find things in stuff
|
static String |
toNormalizedJqPath(List<NestedPathPart> paths)
Given a list of part finders, convert it to a "normalized" 'jq' path format that is consistent with how
StructuredDataProcessor constructs field path names |
static String |
toNormalizedJsonPath(List<NestedPathPart> paths) |
public static final String JSON_PATH_ROOT
public static final String JQ_PATH_ROOT
@Nullable public static Object find(@Nullable Object data, List<NestedPathPart> path)
@Nullable public static Object[] findKeys(@Nullable Object data, List<NestedPathPart> path)
public static String toNormalizedJsonPath(List<NestedPathPart> paths)
public static List<NestedPathPart> parseJsonPath(@Nullable String path)
public static String toNormalizedJqPath(List<NestedPathPart> paths)
StructuredDataProcessor constructs field path namespublic static List<NestedPathPart> parseJqPath(@Nullable String path)
Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.