How do I map a JSON webservice response where it is unknown how many children are coming

How do I map a JSON response where it is unknown how many levels the response contains. In a repeating array construction, my response contains a children [ ] array, a child object can then have the same children array and so on... In reality these mappings will be finite but it is hard to predict how many levels the webservice will return. Is there any way to configure this as a repeating mapping?    
1 answers

Not with a mapping. You have 2 options I think:

  • Create a mapping with a finite number of childs, for instance 10. When the childs in the JSON respons exceed that number your mapping will fail.
  • Do the mapping in a custom Java action that loops through the childs. This way you can handle an infinite number of childs.