public final class JacksonTypeConverters extends Object
TypeConverter
that allows converting json to/from POJOs and other types.
FallbackConverter
.
The converter is disabled by default. To enable then set the property
JacksonConstants.ENABLE_TYPE_CONVERTER
to true on CamelContext.getProperties()
.
JacksonConstants.TYPE_CONVERTER_TO_POJO
can be used to allow converting to POJO types. By
default the converter only attempts to convert to primitive types such as String and numbers. To convert to any kind, then
enable this by setting JacksonConstants.TYPE_CONVERTER_TO_POJO
to true on CamelContext.getProperties()
.Constructor and Description |
---|
JacksonTypeConverters() |
Modifier and Type | Method and Description |
---|---|
<T> T |
convertTo(Class<T> type,
Exchange exchange,
Object value,
TypeConverterRegistry registry) |
@FallbackConverter public <T> T convertTo(Class<T> type, Exchange exchange, Object value, TypeConverterRegistry registry) throws Exception
Exception
Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.