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

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

Expand Messages
  • Martin Cooper
    Aug 2, 2005
    • 0 Attachment
      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
      >
      >
      >
      >
      >
      >
      >
    • Show all 13 messages in this topic