You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.9 KiB
57 lines
1.9 KiB
10 years ago
|
package com.jayway.jsonpath;
|
||
|
|
||
|
import com.jayway.jsonpath.spi.json.GsonJsonProvider;
|
||
|
import com.jayway.jsonpath.spi.json.JacksonJsonNodeJsonProvider;
|
||
|
import com.jayway.jsonpath.spi.json.JacksonJsonProvider;
|
||
|
import com.jayway.jsonpath.spi.json.JsonSmartJsonProvider;
|
||
|
import com.jayway.jsonpath.spi.mapper.GsonMappingProvider;
|
||
|
import com.jayway.jsonpath.spi.mapper.JacksonMappingProvider;
|
||
|
import com.jayway.jsonpath.spi.mapper.JsonSmartMappingProvider;
|
||
|
|
||
|
import java.util.Arrays;
|
||
|
|
||
|
public class Configurations {
|
||
|
|
||
|
public static final Configuration GSON_CONFIGURATION = Configuration
|
||
|
.builder()
|
||
|
.mappingProvider(new GsonMappingProvider())
|
||
|
.jsonProvider(new GsonJsonProvider())
|
||
|
.build();
|
||
|
|
||
|
public static final Configuration JACKSON_CONFIGURATION = Configuration
|
||
|
.builder()
|
||
|
.mappingProvider(new JacksonMappingProvider())
|
||
|
.jsonProvider(new JacksonJsonProvider())
|
||
|
.build();
|
||
|
|
||
|
public static final Configuration JACKSON_JSON_NODE_CONFIGURATION = Configuration
|
||
|
.builder()
|
||
|
.mappingProvider(new JacksonMappingProvider())
|
||
|
.jsonProvider(new JacksonJsonNodeJsonProvider())
|
||
|
.build();
|
||
|
|
||
|
public static final Configuration JSON_SMART_CONFIGURATION = Configuration
|
||
|
.builder()
|
||
|
.mappingProvider(new JsonSmartMappingProvider())
|
||
|
.jsonProvider(new JsonSmartJsonProvider())
|
||
|
.build();
|
||
|
|
||
|
public static Iterable<Configuration> configurations() {
|
||
|
return Arrays.asList(
|
||
|
JSON_SMART_CONFIGURATION
|
||
|
,GSON_CONFIGURATION
|
||
|
,JACKSON_CONFIGURATION
|
||
|
,JACKSON_JSON_NODE_CONFIGURATION
|
||
|
);
|
||
|
}
|
||
|
|
||
|
|
||
|
public static Iterable<Configuration> objectMappingConfigurations() {
|
||
|
return Arrays.asList(
|
||
|
GSON_CONFIGURATION
|
||
|
,JACKSON_CONFIGURATION
|
||
|
,JACKSON_JSON_NODE_CONFIGURATION
|
||
|
);
|
||
|
}
|
||
|
}
|