Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-562

Pretty print the json dump

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • Servlets Get 2.0.2, Commons JSON 2.0.2
    • Commons JSON 2.0.4
    • Commons
    • None

    Description

      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?

      Attachments

        1. json_tidy.r673772.patch
          5 kB
          Tobias Bocanegra

        Activity

          People

            bdelacretaz Bertrand Delacretaz
            tripod Tobias Bocanegra
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: