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

Re: java/org.json.JSONString

Expand Messages
  • Douglas Crockford
    ... result, then ... occur, ... JSON should You are right. It should throw a JSONException instead.
    Message 1 of 3 , Jun 4, 2006
    View Source
    • 0 Attachment
      > > I have added a JSONString interface. A class implementing it can
      > > customize the JSON serialization of its instances.
      > >
      > > http://www.json.org/java/index.html
      >
      > On that page:
      > > If toJSONString throws any exception, or returns a non-string
      result, then
      > > the string value will be obtained the default way.
      >
      > This seems like a dangerous masking of errors. If these conditions
      occur,
      > I would think the error should propagate, and the serialization to
      JSON should

      You are right. It should throw a JSONException instead.
    Your message has been successfully submitted and would be delivered to recipients shortly.