类 JsonbHttpMessageConverter
java.lang.Object
cn.taketoday.http.converter.AbstractHttpMessageConverter<T>
cn.taketoday.http.converter.AbstractGenericHttpMessageConverter<Object>
cn.taketoday.http.converter.json.AbstractJsonHttpMessageConverter
cn.taketoday.http.converter.json.JsonbHttpMessageConverter
- 所有已实现的接口:
GenericHttpMessageConverter<Object>,HttpMessageConverter<Object>
Implementation of
HttpMessageConverter
that can read and write JSON using the
JSON Binding API.
This converter can be used to bind to typed beans or untyped HashMaps.
By default, it supports application/json and application/*+json with
UTF-8 character set.
- 从以下版本开始:
- 4.0
- 作者:
- Juergen Hoeller
- 另请参阅:
-
字段概要
字段从类继承的字段 cn.taketoday.http.converter.AbstractHttpMessageConverter
logger -
构造器概要
构造器构造器说明Construct a newJsonbHttpMessageConverterwith default configuration.JsonbHttpMessageConverter(Jsonb jsonb) Construct a newJsonbHttpMessageConverterwith the given delegate.JsonbHttpMessageConverter(JsonbConfig config) Construct a newJsonbHttpMessageConverterwith the given configuration. -
方法概要
修饰符和类型方法说明getJsonb()Return the configuredJsonbinstance for this converter.protected ObjectreadInternal(Type resolvedType, Reader reader) Template method that reads the JSON-bound object from the givenReader.voidSet theJsonbinstance to use.protected voidwriteInternal(Object object, Type type, Writer writer) Template method that writes the JSON-bound object to the givenWriter.从类继承的方法 cn.taketoday.http.converter.json.AbstractJsonHttpMessageConverter
read, readInternal, setJsonPrefix, setPrefixJson, writeInternal从类继承的方法 cn.taketoday.http.converter.AbstractGenericHttpMessageConverter
canRead, canWrite, supports, write, writeInternal从类继承的方法 cn.taketoday.http.converter.AbstractHttpMessageConverter
addDefaultHeaders, canRead, canRead, canWrite, canWrite, getContentLength, getDefaultCharset, getDefaultContentType, getSupportedMediaTypes, read, setDefaultCharset, setSupportedMediaTypes, write从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 cn.taketoday.http.converter.HttpMessageConverter
canRead, canWrite, getSupportedMediaTypes, getSupportedMediaTypes, read, write
-
字段详细资料
-
jsonb
-
-
构造器详细资料
-
JsonbHttpMessageConverter
public JsonbHttpMessageConverter()Construct a newJsonbHttpMessageConverterwith default configuration. -
JsonbHttpMessageConverter
Construct a newJsonbHttpMessageConverterwith the given configuration.- 参数:
config- theJsonbConfigfor the underlying delegate
-
JsonbHttpMessageConverter
Construct a newJsonbHttpMessageConverterwith the given delegate.- 参数:
jsonb- the Jsonb instance to use
-
-
方法详细资料
-
setJsonb
Set theJsonbinstance to use. If not set, a defaultJsonbinstance will be created.Setting a custom-configured
Jsonbis one way to take further control of the JSON serialization process. -
getJsonb
Return the configuredJsonbinstance for this converter. -
readInternal
从类复制的说明:AbstractJsonHttpMessageConverterTemplate method that reads the JSON-bound object from the givenReader.- 指定者:
readInternal在类中AbstractJsonHttpMessageConverter- 参数:
resolvedType- the resolved generic typereader- the Reader to use- 返回:
- the JSON-bound object
- 抛出:
Exception- in case of read/parse failures
-
writeInternal
从类复制的说明:AbstractJsonHttpMessageConverterTemplate method that writes the JSON-bound object to the givenWriter.- 指定者:
writeInternal在类中AbstractJsonHttpMessageConverter- 参数:
object- the object to write to the output messagetype- the type of object to write (may benull)writer- the Writer to use- 抛出:
Exception- in case of write failures
-