From 44cc16c57e76a03696c8fa171000b33ddf07da55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Go=C5=82e=CC=A8biowski?= Date: Wed, 23 Nov 2016 12:46:26 +0100 Subject: [PATCH] jQuery.parseJSON: Move the deprecation note to the top, rephrase it The deprecation note has been moved to the top of the description as it's the most important information about the API. This is also how other pages for deprecated APIs are documented. Also, the message has been rephrased a little as JSON is a string, not an object. Ref #899 Closes #1000 --- entries/jQuery.parseJSON.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entries/jQuery.parseJSON.xml b/entries/jQuery.parseJSON.xml index d0965e41..054663df 100644 --- a/entries/jQuery.parseJSON.xml +++ b/entries/jQuery.parseJSON.xml @@ -14,6 +14,7 @@ Takes a well-formed JSON string and returns the resulting JavaScript value. +

As of jQuery 3.0, $.parseJSON is deprecated. To parse JSON strings use the native JSON.parse method instead.

Passing in a malformed JSON string results in a JavaScript exception being thrown. For example, the following are all invalid JSON strings: