You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@johnzon.apache.org by "Steven Walters (JIRA)" <ji...@apache.org> on 2019/08/07 13:30:00 UTC
[jira] [Created] (JOHNZON-227) Serialization error when
Adapter/Converter changes "arrayity" of type
Steven Walters created JOHNZON-227:
--------------------------------------
Summary: Serialization error when Adapter/Converter changes "arrayity" of type
Key: JOHNZON-227
URL: https://issues.apache.org/jira/browse/JOHNZON-227
Project: Johnzon
Issue Type: Bug
Components: Mapper
Affects Versions: 1.1.13
Reporter: Steven Walters
Attachments: johnzon-mapper-byte-array-to-hex.zip
When using an Adapter on a data type field where the "arrayity" of the field changes, such as the case of `byte[]` to `String` adapter (such as serializing binary as hexadecimal instead of base64)
Mapper works without issue when deserializing/reading the data, but causes an IllegalArgumentException "This is not an array" when attempting to serialize the object.
This seems to be related to how the mapper reader caches the field's "arrayity" and does not expect/allow it to be changed by an adapter/converter.
Small junit suite that reproduces the functioning deserialization and failing serialization is attached.
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)