You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Bertrand Delacretaz (JIRA)" <ji...@apache.org> on 2008/07/30 17:33:32 UTC
[jira] Resolved: (SLING-562) Pretty print the json dump
[ https://issues.apache.org/jira/browse/SLING-562?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bertrand Delacretaz resolved SLING-562.
---------------------------------------
Resolution: Fixed
Patch committed in revision 681080 with some changes to use the tidy selector instead of a request parameter.
Examples URLs:
http://localhost:8888/sling-logo.png.tidy.infinity.json
http://localhost:8888/sling-logo.png.tidy.json
http://localhost:8888/sling-logo.png.infinity.json
http://localhost:8888/sling-logo.png.json
See also the tests at the end of http://svn.eu.apache.org/repos/asf/incubator/sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/JsonRenderingTest.java
Please cross-check and close this issue, and maybe open another one to configure the tidy format as the default.
> Pretty print the json dump
> --------------------------
>
> Key: SLING-562
> URL: https://issues.apache.org/jira/browse/SLING-562
> Project: Sling
> Issue Type: Improvement
> Components: Commons JSON
> Affects Versions: Commons JSON 2.0.2, Servlets Get 2.0.2
> Reporter: Tobias Bocanegra
> Assignee: Bertrand Delacretaz
> Priority: Minor
> Attachments: json_tidy.r673772.patch
>
>
> the current json exports are using the JSONWriter which writes a very compact for of json.
> this is certainly good for performance, but a big pain when developping / debugging.
> It would be cool if a 'pretty print' flag can be passed to the export that enables nice
> formatted jsons. eg http://localhost/content/site/en.3.json?tidy=true
> I patched the current JSONWriter and JsonItemWriter and added the respective flag to the servlet.
> WDYT?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.