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

Re: [json] Re: JSON Propositions

Expand Messages
  • Andrew Faulds
    Ah, I see. Well, I d suggest changing the name to something more geared towards configuration... ECL, perhaps? ... -- Andrew Faulds (AJF) http://ajf.me/
    Message 1 of 51 , Jul 10 4:15 PM
    • 0 Attachment
      Ah, I see. Well, I'd suggest changing the name to something more geared
      towards configuration... ECL, perhaps?

      On 11 July 2012 00:12, Ben Atkin <ben@...> wrote:

      > **
      >
      >
      > Thanks; I realize that, and also that since I'm the one making a file
      > format I should be more accepting of criticism.
      >
      > But I don't mean to be whining. I see people using JSON for complex
      > human-edited configuration files, and it's a testament to how much nicer it
      > is than XML and more approachable it is than YAML. And for a lot of
      > configuration formats, comments aren't all that useful.
      >
      > But some people really want traditional comments, and they are calling
      > their files with comments json. And this could break things. I'd like to
      > provide an alternative to call it something else so they'll know that it
      > needs to be run through a minifier before handing it off to a json parser.
      >
      > Ben
      >
      >
      > --- In json@yahoogroups.com, Andrew Faulds <ajfweb@...> wrote:
      > >
      > > I'm not telling you what to do, I'm just saying that whining that a fixed
      > > standard, which is designed for something different to what you want,
      > does
      > > not do what you want, is rather pointless.
      > >
      > > On 10 July 2012 23:42, Ben Atkin <ben@...> wrote:
      > >
      > > > **
      >
      > > >
      > > >
      > > > Don't tell me what to do.
      > > >
      > > >
      > > > --- In json@yahoogroups.com, Andrew Faulds <ajfweb@> wrote:
      > > > >
      > > > > Don't complain that JSON isn't what you want it to be. There are
      > plenty
      > > > of
      > > > > alternative formats, use one of them, instead.
      > > > >
      > > > > On 10 July 2012 23:39, Ben Atkin <ben@> wrote:
      > > > >
      > > > > > **
      > > >
      > > > > >
      > > > > >
      > > > > > Which format should I use, then? XML?
      > > > > >
      > > > > > http://www.coderanch.com/t/128908/XML/Preserve-comments-XSL
      > > > > >
      > > > > > But I like JSON! Also these configs are going to get turned into a
      > JSON
      > > > > > structure at some point, whether it's parsing eon, or converting
      > eon to
      > > > > > JSON before parsing it.
      > > > > >
      > > > > >
      > > > > > Ben
      > > > > >
      > > > > > --- In json@yahoogroups.com, Andrew Faulds <ajfweb@> wrote:
      > > > > > >
      > > > > > > You don't want JSON, then. JSON isn't designed to update an
      > existing
      > > > > > file,
      > > > > > > it deserialises and serialises.
      > > > > > >
      > > > > > > On 10 July 2012 23:18, Ben Atkin <ben@> wrote:
      > > > > > >
      > > > > > > > **
      > > > > >
      > > > > > > >
      > > > > > > >
      > > > > > > > Thanks for pointing that out.
      > > > > > > >
      > > > > > > > That reminds me - another thing I want is to be able to
      > > > automatically
      > > > > > > > change something in an eon file without stripping out comments
      > or
      > > > > > > > whitespace or changing the order of things. This will require a
      > > > parser
      > > > > > of
      > > > > > > > sorts and not just a minifying step.
      > > > > > > >
      > > > > > > > Ben
      > > > > > > >
      > > > > > > >
      > > > > > > > --- In json@yahoogroups.com, Andrew Faulds <ajfweb@> wrote:
      > > > > > > > >
      > > > > > > > > JSMin isn't a full-blown filter, it relies on valid JS/JSON
      > being
      > > > > > passed
      > > > > > > > > in. pass in "b + ++a" and you'll get "b+++a" out.
      > > > > > > > >
      > > > > > > > > On 10 July 2012 23:12, Ben Atkin <ben@> wrote:
      > > > > > > > >
      > > > > > > > > > **
      > > > > > > >
      > > > > > > > > >
      > > > > > > > > >
      > > > > > > > > > I agree filtering makes sense, but why run it through a
      > > > full-blown
      > > > > > > > filter
      > > > > > > > > > when all I want is to support comments? I think this is a
      > nice
      > > > > > > > efficient
      > > > > > > > > > and simple tool for just removing comments:
      > > > > > > > > > https://github.com/kitcambridge/json-compressor
      > > > > > > > > >
      > > > > > > > > > I'm thinking of using that as the main way and only using
      > my
      > > > custom
      > > > > > > > jison
      > > > > > > > > > parser when I want to give detailed error messages.
      > > > > > > > > >
      > > > > > > > > > Also a main goal I have is to get it to work in multiple
      > > > > > programming
      > > > > > > > > > languages. Most of my test suite is JSON - it just has a
      > tiny
      > > > > > runner
      > > > > > > > that
      > > > > > > > > > iterates through the test data, so that makes it easy to
      > port.
      > > > > > Having a
      > > > > > > > > > native version could make it easier for users of the other
      > > > > > languages.
      > > > > > > > > >
      > > > > > > > > > Ben
      > > > > > > > > >
      > > > > > > > > > --- In json@yahoogroups.com, "douglascrockford" <douglas@>
      > > > wrote:
      > > > > > > > > >
      > > > > > > > > > >
      > > > > > > > > > > --- In json@yahoogroups.com, "Ben Atkin" <ben@> wrote:
      > > > > > > > > > > >
      > > > > > > > > > > > The standard is respected in most places. Try adding
      > > > comments
      > > > > > and
      > > > > > > > then
      > > > > > > > > > using a common JSON parser (like the one in Firefox or
      > Chrome)
      > > > and
      > > > > > > > you'll
      > > > > > > > > > see an error. Because of that, it's foolish to output JSON
      > that
      > > > > > doesn't
      > > > > > > > > > conform to the spec.
      > > > > > > > > > > >
      > > > > > > > > > > > I'm not especially interested in the three changes in
      > the
      > > > > > original
      > > > > > > > > > thread. What I do find interesting is comment support.
      > JSON is
      > > > so
      > > > > > nice
      > > > > > > > and
      > > > > > > > > > simple that it's often being used for configuration and not
      > > > just
      > > > > > > > > > serialization. In many cases, comments are more useful than
      > > > > > > > problematic in
      > > > > > > > > > configuration files. For this reason I'm working on making
      > a
      > > > > > standard
      > > > > > > > > > format that is simply JSON+comments, and I'm calling it Eon
      > > > > > (EcmaScript
      > > > > > > > > > Object Notation). I think if you're going to try to come up
      > > > with
      > > > > > your
      > > > > > > > own
      > > > > > > > > > JSON-like format, you should come up with a file extension
      > and
      > > > > > > > content-type
      > > > > > > > > > that doesn't contain "json". Some HTTP client libraries
      > will
      > > > try to
      > > > > > > > parse
      > > > > > > > > > everything that has the substring "json" in its content
      > type,
      > > > and
      > > > > > it's
      > > > > > > > best
      > > > > > > > > > not to break those, even though they should arguably be
      > > > checking
      > > > > > for
      > > > > > > > word
      > > > > > > > > > boundaries.
      > > > > > > > > > >
      > > > > > > > > > >
      > > > > > > > > > > You don't need a new standard. Just pipe JSMin in front
      > of
      > > > your
      > > > > > JSON
      > > > > > > > > > parser.
      > > > > > > > > > >
      > > > > > > > > >
      > > > > > > > > >
      > > > > > > > > >
      > > > > > > > >
      > > > > > > > >
      > > > > > > > >
      > > > > > > > > --
      > > > > > > > > Andrew Faulds (AJF)
      > > > > > > > > http://ajf.me/
      > > > > > > > >
      > > > > > > > >
      > > > > > > > > [Non-text portions of this message have been removed]
      > > > > > > > >
      > > > > > > >
      > > > > > > >
      > > > > > > >
      > > > > > >
      > > > > > >
      > > > > > >
      > > > > > > --
      > > > > > > Andrew Faulds (AJF)
      > > > > > > http://ajf.me/
      > > > > > >
      > > > > > >
      > > > > > > [Non-text portions of this message have been removed]
      > > > > > >
      > > > > >
      > > > > >
      > > > > >
      > > > >
      > > > >
      > > > >
      > > > > --
      > > > > Andrew Faulds (AJF)
      > > > > http://ajf.me/
      > > > >
      > > > >
      > > > > [Non-text portions of this message have been removed]
      > > > >
      > > >
      > > >
      > > >
      > >
      > >
      > >
      > > --
      > > Andrew Faulds (AJF)
      > > http://ajf.me/
      > >
      > >
      > > [Non-text portions of this message have been removed]
      > >
      >
      >
      >



      --
      Andrew Faulds (AJF)
      http://ajf.me/


      [Non-text portions of this message have been removed]
    • Jonas Tärnström
      The beauty and usefulness of JSON is in my opinion more of what they left out than what they took in. Any attempts to extend it is to make it less useful. //JT
      Message 51 of 51 , Aug 16, 2012
      • 0 Attachment
        The beauty and usefulness of JSON is in my opinion more of what they left
        out than what they took in.
        Any attempts to extend it is to make it less useful.

        //JT

        2012/7/10 johnnys <marler8997@...>

        > **
        >
        >
        > I've published a web page with some propositions to modify JSON at
        > http://json.marler.info <http://json.marler.info>
        > I wanted to post this so I could see what people think of these
        > propositions. Any comments/suggestions/criticism are welcome.
        >
        > [Non-text portions of this message have been removed]
        >
        >
        >



        --
        --
        Jonas T�rnstr�m
        Product Manager
        � e-mail: jonas.tarnstrom@...
        � skype: full name "Jonas T�rnstr�m"
        � phone: +46 (0)734 231 552

        ESN Social Software AB
        www.esn.me


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