TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
sheetal
NA
22
20.3k
JSON error
Feb 8 2012 5:22 AM
Hi,
I am working on a maintenance project and they have used JSON in that project. I am getting the following error Microsoft JScript compilation error: Syntax error in the code snippet. I am new to JSON and after adding watch window I got to know the error and that is expected '(' .But I am not getting the correct syntax.
Following is the code snippet where I am getting the error:
parse : function(jsonString) {
// filter out while statement
var js = jsonString;
if (js.substr(0,9) == "while(1);") { js = js.substr(9); }
if (js.substr(0,2) == "/*") { js = js.substr(2,js.length-4); }
return eval('('+js+')');
}
Can anyone help me?
Thanks,
Sheetal
Reply
Answers (
1
)
Steps to do SMTP REDIRECTION
Plese Guide how to put Source Code at one place and its work like Microsoft Visual Source Safe