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

Why is JSON read only?

Expand Messages
  • Merlin
    var fred; if (!fred) { fred = {}; } var FRED; if (!FRED) { FRED = {}; } var JSON; if (!JSON) { JSON = {}; } Error: Problem at line 13 character 5: Read only.
    Message 1 of 2 , Oct 14, 2011
    • 0 Attachment
      var fred;
      if (!fred) {
      fred = {};
      }

      var FRED;
      if (!FRED) {
      FRED = {};
      }

      var JSON;
      if (!JSON) {
      JSON = {};
      }

      Error:
      Problem at line 13 character 5: Read only.

      JSON = {};
    • Douglas Crockford
      ... It is a global object provided by ES5.
      Message 2 of 2 , Oct 14, 2011
      • 0 Attachment
        --- In jslint_com@yahoogroups.com, "Merlin" <g7awz@...> wrote:
        >
        > var fred;
        > if (!fred) {
        > fred = {};
        > }
        >
        > var FRED;
        > if (!FRED) {
        > FRED = {};
        > }
        >
        > var JSON;
        > if (!JSON) {
        > JSON = {};
        > }
        >
        > Error:
        > Problem at line 13 character 5: Read only.
        >
        > JSON = {};

        It is a global object provided by ES5.
      Your message has been successfully submitted and would be delivered to recipients shortly.