public class JsonPathConfig extends Object
Float.MAX_VALUE
or doubles
for larger numbers. In Groovy 1.8.5 they changed so that all numbers are now BigDecimals. If you prefer that
you can configure the JsonPathConfig.NumberReturnType
to be JsonPathConfig.NumberReturnType.BIG_DECIMAL
.Modifier and Type | Class and Description |
---|---|
static class |
JsonPathConfig.NumberReturnType
Specifies what kind of numbers to return.
|
Constructor and Description |
---|
JsonPathConfig()
Creates a new JsonPathConfig that is configured to return floats and doubles and use the systems default charset for JSON data.
|
JsonPathConfig(JsonPathConfig.NumberReturnType numberReturnType)
Create a new JsonPathConfig that returns JSON numbers as either Doubles and Floats or BigDecimals
|
JsonPathConfig(JsonPathConfig config)
Create a new instance of a JsonPathConfig based on the properties in the supplied config.
|
JsonPathConfig(String defaultCharset)
Create a new JsonPathConfig that uses the
defaultCharset when deserializing JSON data. |
public JsonPathConfig(JsonPathConfig config)
config
- The config to copy.public JsonPathConfig()
public JsonPathConfig(JsonPathConfig.NumberReturnType numberReturnType)
public JsonPathConfig(String defaultCharset)
defaultCharset
when deserializing JSON data.public String charset()
public JsonPathConfig charset(String charset)
public JsonPathConfig.NumberReturnType numberReturnType()
public JsonPathConfig numberReturnType(JsonPathConfig.NumberReturnType numberReturnType)
numberReturnType
- The choice.public boolean shouldRepresentJsonNumbersAsBigDecimal()
public JsonParserType defaultParserType()
public boolean hasDefaultParserType()
public boolean hasCustomGsonObjectMapperFactory()
public boolean hasCustomJackson10ObjectMapperFactory()
public boolean hasCustomJackson20ObjectMapperFactory()
public boolean hasCustomJohnzonObjectMapperFactory()
public boolean hasCustomJsonbObjectMapperFactory()
public JsonPathConfig defaultParserType(JsonParserType defaultParserType)
defaultParserType
- The parser type to use. If null
then classpath scanning will be used.public JsonPathObjectDeserializer defaultDeserializer()
public boolean hasDefaultDeserializer()
public JsonPathConfig defaultObjectDeserializer(JsonPathObjectDeserializer defaultObjectDeserializer)
defaultObjectDeserializer
- The object de-serializer to use. If null
then classpath scanning will be used.public GsonObjectMapperFactory gsonObjectMapperFactory()
public JsonPathConfig gsonObjectMapperFactory(GsonObjectMapperFactory gsonObjectMapperFactory)
gsonObjectMapperFactory
- The object mapper factorypublic Jackson1ObjectMapperFactory jackson1ObjectMapperFactory()
public JsonPathConfig jackson1ObjectMapperFactory(Jackson1ObjectMapperFactory jackson1ObjectMapperFactory)
jackson1ObjectMapperFactory
- The object mapper factorypublic Jackson2ObjectMapperFactory jackson2ObjectMapperFactory()
public JohnzonObjectMapperFactory johnzonObjectMapperFactory()
public JsonPathConfig jackson2ObjectMapperFactory(Jackson2ObjectMapperFactory jackson2ObjectMapperFactory)
jackson2ObjectMapperFactory
- The object mapper factorypublic JsonbObjectMapperFactory jsonbObjectMapperFactory()
public JsonPathConfig jsonbObjectMapperFactory(JsonbObjectMapperFactory jsonbObjectMapperFactory)
jsonbObjectMapperFactory
- The object mapper factorypublic static JsonPathConfig jsonPathConfig()
public JsonPathConfig with()
public JsonPathConfig and()
Copyright © 2010–2020. All rights reserved.