Jump to content

When the array has only 1 entry, it is serialized not as an array, but as a single dictionary.


mrigank sevak

Recommended Posts

HI,

 

When i am trying to host a webservice in JSON; if the element is single it doesnt display as an array for json while for multiple it shows a json. Can we fix the conversion for single element in TDV

 

Multi Element - Item - Shown as Array if multiple items

{

"shiporderResponse": {

"shiporder": {

"orderperson": "Able Computing",

"item": [

{

"title": "USA",

"note": "2003-02-04"

},

{

"title": "USA",

"note": "2003-02-08"

}

]

}

}

}

 

Single Element - Item not displayed as Array

{

"shiporderResponse": {

"shiporder": {

"orderperson": "Able Computing",

"item": {

"title": "USA",

"note": "2003-02-04"

}

}

}

}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...