Loading ...
Sorry, an error occurred while loading the content.

Tidy JSON - Pretty printer/colorer for JSON

Expand Messages
  • Atif Aziz
    The human-readable aspect of JSON is all well and good in theory, but turns out to be a mute point in practice. Most JSON producers in the current web
    Message 1 of 3 , Jan 1, 2007
    • 0 Attachment
      The human-readable aspect of JSON is all well and good in theory, but
      turns out to be a mute point in practice. Most JSON producers in the
      current web landscape tend to use zero whitespaces or formatting,
      favoring (for better or worse) lambda resource savings over human
      readability. It does, however, make one's life a bit difficult when
      you're trying to get accustomed to some new JSON data, especially while
      messing with a live service to get a feel for what it produces and how
      it works. To help with my own field work, I succumbed to writing my own
      JSON pretty printer and colorer in C# after failing to find one. The
      purpose of this message is to simply drop a pointer to the
      console/terminal tool in case you've felt my pain and are looking for a
      relief:

      http://www.raboof.com/projects/tidyjson

      Tidy JSON will work on Windows with .NET Framework 2.0 and on Linux
      boxes with Mono 1.2. The only glitch with the Linux/Mono combo is that
      you don't get coloring if you're feeding JSON over standard input to
      tidyjson (send me a mail if you know why and/or how to fix it). You just
      get pretty printing. Coloring works fine if the JSON data is stored in a
      file. On Windows, it works as advertised.

      - Atif
    • Josh Sled
      ... I did a similar thing; the attached HTML page is a stand-alone (html + javascript) page which contains a text area into which you can paste json; on submit
      Message 2 of 3 , Jan 2, 2007
      • 0 Attachment
        On Tue, 2007-01-02 at 00:11 +0100, Atif Aziz wrote:
        > The human-readable aspect of JSON is all well and good in theory, but
        > turns out to be a mute point in practice. Most JSON producers in the
        > current web landscape tend to use zero whitespaces or formatting,
        > favoring (for better or worse) lambda resource savings over human
        > readability. It does, however, make one's life a bit difficult when
        > you're trying to get accustomed to some new JSON data, especially
        > while
        > messing with a live service to get a feel for what it produces and how
        > it works. To help with my own field work, I succumbed to writing my
        > own
        > JSON pretty printer and colorer in C# after failing to find one. The

        I did a similar thing; the attached HTML page is a stand-alone (html +
        javascript) page which contains a text area into which you can paste
        json; on submit it is rendered as a set of nested tables in the page.

        --
        ...jsled
        http://asynchronous.org/ - a=jsled;b=asynchronous.org;echo ${a}@${b}


        [Non-text portions of this message have been removed]
      • Josh Sled
        ... [...] ... Pfft. Thanks, Yahoo Groups... http://asynchronous.org/2006/json.html.tar.gz is what I d attached. It s archived and compressed in an attempt to
        Message 3 of 3 , Jan 2, 2007
        • 0 Attachment
          On Tue, 2007-01-02 at 11:47 -0500, Josh Sled wrote:
          > I did a similar thing; the attached HTML page is a stand-alone (html +
          > javascript) page which contains a text area into which you can paste
          > json; on submit it is rendered as a set of nested tables in the page.
          [...]
          > [Non-text portions of this message have been removed]

          Pfft. Thanks, Yahoo Groups...

          http://asynchronous.org/2006/json.html.tar.gz is what I'd attached.
          It's archived and compressed in an attempt to disallow the evaluation of
          javascript in the context of my domain.

          ...which makes me realize that I should note that it does interpret the
          json via simple eval(...), so don't use it for untrusted json
          sources. :)

          --
          ...jsled
          http://asynchronous.org/ - a=jsled;b=asynchronous.org;echo ${a}@${b}


          [Non-text portions of this message have been removed]
        Your message has been successfully submitted and would be delivered to recipients shortly.