Bug 63035 - JSON : Switch from JsonSmartJsonProvider to JacksonJsonProvider
Summary: JSON : Switch from JsonSmartJsonProvider to JacksonJsonProvider
Status: NEW
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 5.0
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-23 21:51 UTC by Philippe Mouawad
Modified: 2018-12-23 21:52 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Mouawad 2018-12-23 21:51:51 UTC
JSON Smart default JSON provider of json-path is no more maintained.

We should switch to Jackson as underlying implementation:

Configuration.setDefaults(new Configuration.Defaults() {

    private final JsonProvider jsonProvider = new JacksonJsonProvider();
    private final MappingProvider mappingProvider = new JacksonMappingProvider();
      
    @Override
    public JsonProvider jsonProvider() {
        return jsonProvider;
    }

    @Override
    public MappingProvider mappingProvider() {
        return mappingProvider;
    }
    
    @Override
    public Set<Option> options() {
        return EnumSet.noneOf(Option.class);
    }
});


Reference docs:
- https://github.com/FasterXML/jackson
- https://github.com/json-path/JsonPath/blob/master/json-path/src/main/java/com/jayway/jsonpath/spi/json/JacksonJsonNodeJsonProvider.java
- https://github.com/json-path/JsonPath/blob/master/json-path/src/main/java/com/jayway/jsonpath/spi/json/JacksonJsonProvider.java
Comment 1 Philippe Mouawad 2018-12-23 21:52:48 UTC
See also:

- https://github.com/json-path/JsonPath/issues/513