bhardwajrahul20 commented on a change in pull request #1: Sling-7346-Json
response converting response property value to string even if it is json object
URL:
https://github.com/apache/sling-org-apache-sling-servlets-post/pull/1#discussion_r159595820
##########
File path: src/main/java/org/apache/sling/servlets/post/JSONResponse.java
##########
@@ -103,9 +104,13 @@ JsonObject getJson() {
JsonObjectBuilder jsonBuilder = Json.createObjectBuilder();
for (Map.Entry<String, Object> entry : json.entrySet()) {
if (entry.getValue() != null) {
- jsonBuilder.add(entry.getKey(), entry.getValue().toString());
- }
- else {
+ try {
Review comment:
@kwin - That's difficult because the class type of entry value can't be
restricted to a range. We can't really exhaustively give all the possible json
class names.
----------------------------------------------------------------
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]
With regards,
Apache Git Services