Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-5301

JSONProvider should add an array key for root if arrayKeys is not empty but top level array has to be produced

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 3.0.0-milestone1, 2.7.8, 2.6.11
    • None
    • None
    • Unknown

    Description

      Setting dropRootElement to true, dropRootElementInXmlStream to false and serializeAsArray is sufficient to do a top level array serialization, example,

      [{"someobject":{"a":"value"}}]
      

      However if someobject is also expected to be an array the setting "arrayKeys" properties loses top level '[]':

      {"someobject":[{"a":"value"}]}
      

      Fixing it will lead to

      [{"someobject":[{"a":"value"}]]
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            sergey_beryozkin Sergey Beryozkin
            sergey_beryozkin Sergey Beryozkin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment