How to use Object List data type for a structure attribute?
Service Studio Version
11.14.14 (Build 59923)

Hello,

I have this JSON object : {"val":["ints",[177,178]]}

If I convert this to structure it gives me Structure1 with attribute Val with data type of Text List.

 
 

If we see JSON object above it holds value of Text and then Integer array. To support such values how can I use Object List data type for a structure attribute?

Above JSON object is what I am looking for after serializing Structure, so how can I  create such structure to get desire JSON after serializing.


Regards,

Navnath

Hi Navnath Sonavne,

Is that the pattern ? So you always have a structure with a text value, followed by the Integer array ? If so, isn't this what you are looking for ?



Best regards,

Diogo Romero


Yes there is pattern but its in JSON object with a text value, followed by the Integer array not in Structure.

Structure you suggested will give me below JSON after serialization

{

"name" : "",

"vals" : [1,2,3]

}


But I am looking for JSON like below with Text value & then Integer array.

{

    "val": [

        "ints",

        [

            177,

            178

        ]

    ]

}


Hi Navnath,

Is this what you wanted 

Regards,

Khuong

 Khuong Truong thanks for reply.

But structure you suggested is not what I wanted it will give me below JSON after serializing structure. 

{

  "Val": [

    {

      "name": "test",

      "ints": [

        1,

        2,

        3

      ]

    }

  ]

}


But I am looking for structure so after  serialization I will get  JSON like below where array 1st element will be Text value & then 2nd element will be Integer array.

{

    "val": [

        "ints",

        [

            177,

            178

        ]

    ]

}

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.