[
https://issues.apache.org/jira/browse/SLING-7346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16327864#comment-16327864
]
ASF GitHub Bot commented on SLING-7346:
---------------------------------------
karlpauls opened a new pull request #3: SLING-7346: handle JSONResponse
properties as json if possible.
URL: https://github.com/apache/sling-org-apache-sling-servlets-post/pull/3
@bhardwajrahul20 I reworked your patch a little and tried to work in some of
suggestions by @kwin.
The main idea is to fail fast when a property is set we can't translate into
json and only allow such values (i.e., it is either of type {String, Boolean,
Number, null} or the toString() is parseable as json).
Furthermore, I added some javadoc to make this explicit.
@cziegeler and @rombert - what do you think?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Issues with custom fields in PostResponse as a result of fix for
> SLING-6681(Replace commons.json usage in org.apache.sling.servlets.post)
> -----------------------------------------------------------------------------------------------------------------------------------------
>
> Key: SLING-7346
> URL: https://issues.apache.org/jira/browse/SLING-7346
> Project: Sling
> Issue Type: Bug
> Components: Servlets
> Affects Versions: Servlets Post 2.3.22
> Reporter: Rahul Bhardwaj
> Assignee: Karl Pauls
> Priority: Major
> Fix For: Servlets Post 2.3.24
>
>
> If you set a value of type as map as a custom property in response type,
> instead of parsing properly, whole map is converted into one string and
> therefore, json response does not reach client side in an orderly fashion.
> This can be attributed to [0] which was merged as part of fix for
> SLING-6681(Replace commons.json usage in org.apache.sling.servlets.post)
> [0]
> -https://github.com/apache/sling/commit/a598bd4f6e9fc4f967e118de705643a04a47bc44#diff-2ff02a567147f2cbef2e344d5338dd14R106
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)