Search in sources :

Example 1 with Defaults

use of com.jayway.jsonpath.Configuration.Defaults in project geode by apache.

the class UseJacksonForJsonPathRule method before.

/**
   * Override to set up your specific external resource.
   */
@Override
public void before() {
    saveDefaults();
    Configuration.setDefaults(new 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);
        }
    });
}
Also used : JacksonMappingProvider(com.jayway.jsonpath.spi.mapper.JacksonMappingProvider) Defaults(com.jayway.jsonpath.Configuration.Defaults) Set(java.util.Set) EnumSet(java.util.EnumSet) JacksonJsonProvider(com.jayway.jsonpath.spi.json.JacksonJsonProvider) MappingProvider(com.jayway.jsonpath.spi.mapper.MappingProvider) JacksonMappingProvider(com.jayway.jsonpath.spi.mapper.JacksonMappingProvider) Option(com.jayway.jsonpath.Option) JacksonJsonProvider(com.jayway.jsonpath.spi.json.JacksonJsonProvider) JsonProvider(com.jayway.jsonpath.spi.json.JsonProvider)

Aggregations

Defaults (com.jayway.jsonpath.Configuration.Defaults)1 Option (com.jayway.jsonpath.Option)1 JacksonJsonProvider (com.jayway.jsonpath.spi.json.JacksonJsonProvider)1 JsonProvider (com.jayway.jsonpath.spi.json.JsonProvider)1 JacksonMappingProvider (com.jayway.jsonpath.spi.mapper.JacksonMappingProvider)1 MappingProvider (com.jayway.jsonpath.spi.mapper.MappingProvider)1 EnumSet (java.util.EnumSet)1 Set (java.util.Set)1