Difference between JSON.stringify () and JSON2.stringify ()?

I downloaded JSON2.js from https://github.com/douglascrockford/JSON-js/blob/master/json2.js and it has no implementation for JSON2.stringify ()

To be able to call the wcf service from jquery, I use a helper class that uses JSON2.stringify ()

What is the difference between the two and where can I get JSON2?

+3
source share
1 answer

if you read the file you are referencing mentions

This file creates a global JSON object containing two methods: stringify and parse.

JSON.stringify(value, replacer, space) ...  
JSON.parse(text, reviver) ..

So, a JSON object, not JSON2 ...

[update]

, : jQuery AJAX REST WCF

, , , , ... zip .. JSON .

+10

Source: https://habr.com/ru/post/1736533/


All Articles