Am reading file and storing content in one variable ie var json.
suppose variable contains like this
var json = {
"abc":"abc",
"xyz":"xyz"
}
Above variable contains valid json.
If there is an error happen in Json file, is there a way to find out where the error is, e.g. line number and column number?
like this if it is invalid
var json1 = {
"abc":"abc",
"xyz":xyz"
}
The error should show like this
Parse error on line 3:
...: "abc", "xyz": xyz"}
----------------------^
varstatement. No JSON here."after thexyzproperty name.