-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Description
For the books json example, the jsonpath $..*.title does not work anymore since version 2.7.0 but it worked fine up to version 2.6.0. It used to return the array ["Sayings of the Century","Sword of Honour","Moby Dick","The Lord of the Rings"] which is also returned by jsonpath testers like https://jsonpath.com/. But now only an empty array [] is returned.
The expression gets executed using this Java code:
final JsonMapper objectMapper = JsonMapper.builder()
.configure( SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS, true )
.enable( JsonReadFeature.ALLOW_TRAILING_COMMA.mappedFeature() )
.enable( JsonReadFeature.ALLOW_SINGLE_QUOTES.mappedFeature() )
.build();
final Configuration conf = Configuration
.builder()
.jsonProvider( new JacksonJsonProvider( objectMapper ) )
.mappingProvider( new JacksonMappingProvider( objectMapper ) )
.build();
return JsonPath.using( conf ).parse( json ).read( jsonPath, new TypeRef<>()
{
} );Metadata
Metadata
Assignees
Labels
No labels