Recursive elements and JSON import mapping

0
Hi, we have a JSON schema for log entries, where every log entry has a list of children log entries and so on. Is there a trick to deal with that, by still using an import mapping, to get the entities out of the JSON string? Thanks
asked
2 answers
3

If you know an upper limit to the depth, then you can define an import mapping to handle that.

There is no way to define an import mapping for JSON that imports recursively to an arbitrary depth.

answered
-1

As far as I know:

In the REST service activity in a MF on the last tab (Response) select: Import mapping forthe entire response.

Select your mapping from the created import mappings

Output is type of the parent entity generated with the import mapping and give it a variable name.

If the REST activity is successful, then you can Retrieve over asscociation the child(ren) entities in their objects/list, depending on the type of association.

Do this for all the child relations required.

Hope this helps.

answered