public class NestedPathFinder extends Object
| 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) |
static Object |
findLiteral(Object data,
List<NestedPathPart> path) |
static String |
findStringLiteral(Object data,
List<NestedPathPart> path)
Dig through a thing to find stuff, if that stuff is a not nested itself
|
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 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)
@Nullable public static String findStringLiteral(@Nullable Object data, List<NestedPathPart> path)
@Nullable public static Object findLiteral(@Nullable Object data, List<NestedPathPart> path)
@Nullable public static Object[] findKeys(@Nullable Object data, List<NestedPathPart> path)
Copyright © 2011–2022 The Apache Software Foundation. All rights reserved.