Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
Sling Models Jackson Exporter 1.0.0
-
None
Description
When a model class has a property of type Resource (or a collection of Resource objects), attempting to serialize that class into a String produces a StackOverflow due to the getParent() method.
The simplest solution would be to use Jackson mixins to skip the getParent() (and, for good measure, the getResourceResolver() and getResourceMetadata()) methods. A better solution would be to simply use the standard Sling JSON in these cases.