Refine Jackson canEncode() / canDecode() implementation
This commit refine Jackson canEncode() / canDecode() implementation by using ObjectMapper canSerialize() / canDeserialize() methods. Issue: SPR-14748
This commit is contained in:
@@ -42,7 +42,7 @@ public interface Decoder<T> {
|
||||
* Whether the decoder supports the given target element type and the MIME
|
||||
* type of the source stream.
|
||||
* @param elementType the target element type for the output stream
|
||||
* @param mimeType the mime type associated with the stream to decode
|
||||
* @param mimeType the mime type associated with the stream to decode, can be {@code null} if not specified.
|
||||
* @return {@code true} if supported, {@code false} otherwise
|
||||
*/
|
||||
boolean canDecode(ResolvableType elementType, MimeType mimeType);
|
||||
|
||||
@@ -43,7 +43,7 @@ public interface Encoder<T> {
|
||||
* Whether the encoder supports the given source element type and the MIME
|
||||
* type for the output stream.
|
||||
* @param elementType the type of elements in the source stream
|
||||
* @param mimeType the MIME type for the output stream
|
||||
* @param mimeType the MIME type for the output stream, can be {@code null} if not specified.
|
||||
* @return {@code true} if supported, {@code false} otherwise
|
||||
*/
|
||||
boolean canEncode(ResolvableType elementType, MimeType mimeType);
|
||||
|
||||
Reference in New Issue
Block a user