public List < Object > getAllJsonPath ( String json , String jsonPath ) { List < Object > result ; if ( JsonPath . isPathDefinite ( jsonPath ) ) { Object val = getJsonPath ( json , jsonPath ) ; if ( val == null ) { result = Collections . emptyList ( ) ; } else { result = Collections . singletonList ( val ) ; } } else { result = parseJson ( json ) . read ( jsonPath ) ; } return result ; }
Evaluates a JsonPath expression returning a multiple elements .