[ https://issues.apache.org/jira/browse/SLING-7934?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16617713#comment-16617713 ]
Jason E Bailey commented on SLING-7934: --------------------------------------- [~cziegeler] {code:java} java.javax.JsonObject json = resource.adaptTo(JsonObject .class);{code} Internally it would use the javax.json.JsonObjectBuilder and create a JsonObject based on that Resource. > Add the ability for a resource to adapt to a JSONObject > ------------------------------------------------------- > > Key: SLING-7934 > URL: https://issues.apache.org/jira/browse/SLING-7934 > Project: Sling > Issue Type: Improvement > Reporter: Jason E Bailey > Priority: Major > > There are multiple implementations all doing the same process of converting a > resource to a JSONObject. If it's that common we should just add the ability > to adapt the resource and centralize the implementation so that it's > consistent. -- This message was sent by Atlassian JIRA (v7.6.3#76005)