Create a json text file of your university information and parse using jquery and print your name. The json file must contain your name, rollno, department and CGPA.
Answers
Answered by
0
Explanation:
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:
"{test: 1}" (test does not have double quotes around it).
"{'test': 1}" ('test' is using single quotes instead of double quotes).
"'test'" ('test' is using single quotes instead of double quotes).
".1" (a number must start with a digit; "0.1" would be valid).
"undefined" (undefined cannot be represented in a JSON string; null, however, can be).
"NaN" (NaN cannot be represented in a JSON string; direct representation of Infinity is also not permitted)
Similar questions