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

Re: Sorting the keys of formatted (pretty printed) JSON output

Expand Messages
  • Douglas Crockford
    ... Excellent suggestion. I have modified JSON.Object.
    Message 1 of 7 , Apr 10, 2008
    • 0 Attachment
      --- In json@yahoogroups.com, "Arthur Blake" <arthur.blake@...> wrote:
      > When I have machine generated JSON data that is stored in files, I
      > like to have the JSON data be sorted alphabetically by the keys in the
      > output.
      >
      > It's much easier to find what you are looking for quickly this way
      > when viewing or editing the data (especially when the amount of data
      > is large.)
      >
      > Because there is no defined order of the keys in JSON, it doesn't
      > matter what order you put them in. So we might as well put it in an
      > order that makes it more human readable in contexts where the data is
      > meant to be viewed or edited by humans.

      Excellent suggestion. I have modified JSON.Object.
    Your message has been successfully submitted and would be delivered to recipients shortly.