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

36Re: [json] never mind the backslash. a double-quote dies. Where is the outrage?

Expand Messages
  • Jon Schull
    Aug 2, 2005
    • 0 Attachment
      Ok, I should have said "a serious flaw in the json.py library"

      And it turns out to be a problem in the two python libraries I've
      looked at
      (https://sourceforge.net/projects/json-py/ and http://python.ca/nas/
      log/)

      I'm surprised the requirement that strings be surrounded by double
      quotes applies to the objects themselves. I don't think we can
      always control the quoting of nested expressions....


      =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
      Jon Schull, Ph.D.
      Associate Professor
      Information Technology
      Rochester Institute of Technology
      102 Lomb Memorial Drive
      Rochester, New York 14623
      schull@... 585-738-6696

      On Aug 3, 2005, at 12:35 AM, Martin Cooper wrote:

      > On 8/2/05, jonschull5 <schull@...> wrote:
      > > I don't understand why this isn't considered a serious flaw in
      > JSON...
      > >
      > > For any object o, it should be true that
      > >
      > > json.read( json.write(o) ) == o
      > >
      > > But this is not true for the object {'a':' " '}
      >
      > I'm not sure which implementation you're referring to, since JSON is
      > just a spec, but I'm surprised the above even parses as valid JSON.
      > Strings in JSON must be surrounded by double quotes, and single quotes
      > are not valid.
      >
      > --
      > Martin Cooper
      >
      >
      > > ???????????
      > >
      > > A similarly fatal problem arises when I try to jsonize some a DOM
      > > element that includes an onclick method with a quoted argument.
      > This
      > > is not an improbable use case.
      > >
      > > Is there no solution?
      > >
      > >
      > >
      > >
      > >
      > >
      > >
      > >
      > > Yahoo! Groups Links
      > >
      > >
      > >
      > >
      > >
      > >
      > >
      >
      >
      > SPONSORED LINKS
      > Json Programming languages Format
      > Computer security Computer training Large format
      >
      > YAHOO! GROUPS LINKS
      >
      > Visit your group "json" on the web.
      >
      > To unsubscribe from this group, send an email to:
      > json-unsubscribe@yahoogroups.com
      >
      > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
      >
      >



      [Non-text portions of this message have been removed]
    • Show all 13 messages in this topic