Fixed field name

This commit is contained in:
Fabio Sinibaldi 2022-03-04 11:29:37 +01:00
parent 2654e5d000
commit 5387f6ce04
2 changed files with 11 additions and 2 deletions

View File

@ -18,6 +18,11 @@ import java.util.regex.Pattern;
@Slf4j
public class JSONPathWrapper {
/**
* Based on
*
* https://github.com/json-path/JsonPath
*/
public static Configuration JSON_PATH_ALWAYS_LIST_CONFIG=null;
public static Configuration JSON_PATH_PATHS_CONFIGURATION=null;
@ -63,7 +68,11 @@ public class JSONPathWrapper {
return getByPath(path,Object.class);
}
public List<String> getMatchingPaths(String path){return pathsCTX.read(path); }
public List<String> getMatchingPaths(String path){
List<String> l=pathsCTX.read(path);
l.removeIf(p->p==null);
return l;
}
public <T> List<T> getByPath(String path,Class<T> clazz){
List<T> l= valueCTX.read(path, new TypeRef<List<T>>() {});

View File

@ -8,7 +8,7 @@ import org.bson.Document;
public class HandlerDeclaration {
public static final String ID="_id";
public static final String TYPE="_TYPE";
public static final String TYPE="_type";
public static final String CONFIGURATION="_configuration";
@JsonProperty(ID)