We are using cxf freamwork for webservice development. In the response we are
using *"application/json"*. 

So while converting collection to JSON array jettison behaving differently
based on the count in the collection.

If more than one entries found in the collection it's constructing an array
like the below one,

"Phonenumber": [
         {
            "Type": "Mobile",
            "Phone": "5551111"
         },
         {
            "Type": "Home",
            "Phone": "5552222"
         }
      ]

If only one entry is found in the collection it's not constructing an array
,

"Phonenumber": {
         "Type": "Mobile",
         "Phone": "5551111"
      }


Do we have any workaround to construct in the standard way(By default
construct array and not consider about the collection count)?

Please help on this.

Thanks,
Ganesh.

--
View this message in context: 
http://cxf.547215.n5.nabble.com/Wired-behaviour-in-Jettison-Json-Array-tp5710374.html
Sent from the cxf-dev mailing list archive at Nabble.com.

Reply via email to