[ 
https://issues.apache.org/jira/browse/JOHNZON-206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16807423#comment-16807423
 ] 

Romain Manni-Bucau commented on JOHNZON-206:
--------------------------------------------

[~elexx] Hi Alexander, I suspect it is an "unspecified" case but I tend to 
agree with you that it is surprising.
The reason is to use array type for the serialization which leads to bypass 
JsonValue handling in our generator which are before in general - looks like a 
good idea to use array component type but then it is not polymorphism friendly 
:(.
Do you want to do the PR to fix that?

> toStructure of arrray of JsonObjects serializes JsonObjectImpl like an 
> arbitrary Object
> ---------------------------------------------------------------------------------------
>
>                 Key: JOHNZON-206
>                 URL: https://issues.apache.org/jira/browse/JOHNZON-206
>             Project: Johnzon
>          Issue Type: Bug
>          Components: Mapper
>            Reporter: Alexander Falb
>            Priority: Minor
>
> I'm not sure this is really a bug or more a feature 
> request/improvement/misunderstanding on my side.
> Calling toStructure with an javax.json.JsonObject works fine.
>  Calling it with an JsonArray of JsonObjects works fine.
>  Calling it with an java.langObject[]-Array of Objects works fine.
>  Calling it with an Object[]-Array of JsonObjects treats the JsonObjects as 
> arbitrary Objects resulting in an serialized form of their internals:
> {"integral":true,"valueType":"NUMBER","value":1}
> I would have expected this special treatment of JsonX classes to work on all 
> nesting levels, not only on the top level. What do you think?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to