Link to home
Start Free TrialLog in
Avatar of Manikandan Thiagarajan
Manikandan ThiagarajanFlag for India

asked on

arrylist inside arraylist

i want to make inside json Array list inside array list

{
      "groupInformationKey": 6,
      "groupName": "PortalAdministrator",
      "subGroups": [{
      "groupInformationKey": 52,
      "groupName": "axfxf",
      "subGroups": [{
      "groupInformationKey": 53,
      "groupName": "axx",
      "subGroups": [{groupInformationKey": 54,
      "groupName": "ox",
      "subGroups": null,
      "subNestedGroup": null,
      }

how to make with array list and pojo with sub group inside subgroup and so on
Avatar of ste5an
ste5an
Flag of Germany image

The sample is incomplete, thus incorrect JSON. Then you would start by describing the object hierarchy used. Looks like

class Group {
  string InformationKey;
  string Name;
  List<Group> SubGroups;
}

Open in new window


Then just serialize an instance of that class.
Avatar of Manikandan Thiagarajan

ASKER

that is ok how to make subgroup inside subgroup from the above example

can you give me the pseudo code for that
 how to set DTO and how to add in the arraylist
Please help me
ASKER CERTIFIED SOLUTION
Avatar of manoj kumar
manoj kumar
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
hmm, the marked solution does not create your described JSON.