Justin Edelson created SLING-6295: ------------------------------------- Summary: StackOverflowException when Jackson tries to serialize a Resource object Key: SLING-6295 URL: https://issues.apache.org/jira/browse/SLING-6295 Project: Sling Issue Type: Bug Components: Extensions Affects Versions: Sling Models Jackson Exporter 1.0.0 Reporter: Justin Edelson Assignee: Justin Edelson Priority: Critical Fix For: Sling Models Jackson Exporter 1.0.2
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. -- This message was sent by Atlassian JIRA (v6.3.4#6332)