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.
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.