[ 
https://issues.apache.org/jira/browse/SLING-7934?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16686583#comment-16686583
 ] 

Jason E Bailey commented on SLING-7934:
---------------------------------------

So here is a real world scenario that I currently deal with.
 * I have form submissions that come in and get stored as resources
 * I then process those resources through a workflow.
 * One of the final steps of the workflow is to take the content of the 
resource as it is and send it as json object to an internal message queue.

With your input, which I really appreciate, I don't think the adaptTo solution 
would work. However I feel the current process of converting a resource to JSON 
is to cumbersome. We have an explicit set of possible value types that we work 
with in a map. I feel there should be a solution somewhere, maybe a utility, 
that takes a generic Map<String,Object> and converts it to JSON.

> 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
>            Assignee: 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)

Reply via email to