Search code examples
crossrider

CrossRider - when do we need to use appAPI.JSON?


When do we need to use appAPI.JSON.stringify and appAPI.JSON.parse and why not use JSON.stringify and JSON.parse instead? Is there a difference between appAPI.JSON and JSON in some browsers?


Solution

  • The appAPI.JSON.stringify and appAPI.JSON.parse methods are provided to support for these JSON methods in older browsers that do not natively support JSON.stringify and JSON.parse (e.g. IE7). Hence, it's a good practice to use them from the outset.

    [Disclosure: I am a Crossrider employee]