[
https://issues.apache.org/jira/browse/CXF-5301?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sergey Beryozkin resolved CXF-5301.
-----------------------------------
Resolution: Fixed
Fix Version/s: 2.6.11
2.7.8
3.0.0
> JSONProvider should add an array key for root if arrayKeys is not empty but
> top level array has to be produced
> ----------------------------------------------------------------------------------------------------------------
>
> Key: CXF-5301
> URL: https://issues.apache.org/jira/browse/CXF-5301
> Project: CXF
> Issue Type: Improvement
> Reporter: Sergey Beryozkin
> Assignee: Sergey Beryozkin
> Priority: Minor
> Fix For: 3.0.0, 2.7.8, 2.6.11
>
>
> Setting dropRootElement to true, dropRootElementInXmlStream to false and
> serializeAsArray is sufficient to do a top level array serialization,
> example,
> {noformat}
> [{"someobject":{"a":"value"}}]
> {noformat}
> However if someobject is also expected to be an array the setting "arrayKeys"
> properties loses top level '[]':
> {noformat}
> {"someobject":[{"a":"value"}]}
> {noformat}
> Fixing it will lead to
> {noformat}
> [{"someobject":[{"a":"value"}]]
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira