I am getting Error unexpected token p While doing Json.Parse('E:\chetan\Path);
Please help
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Afzaal Ahmad ZeeshanPosted Mar 20, 2015, 6:43 AM
Json.Parse("E:\\chetan\\Path");
This would make sure that the characters are escaped and not expected as a token or some command. Also, I have changed the value to a string, which must be passed. Your code seems more like a variable-based value.
chetan shindePosted Mar 20, 2015, 5:15 AM
Actually i passing the path of my image folder. its not accepting when i am sending the path and parse it into the json
Afzaal Ahmad ZeeshanPosted Mar 20, 2015, 4:52 AM
I would make 2 solutions, first one is to check whether the file can be readable; if yes, then check for a valid syntax. You can try out this online resource to validate your JSON schema.