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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Afzaal Ahmad ZeeshanRank #60 · 27.6K reputationPosted Mar 20, 2015, 12:52 AM EDT
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.
chetan shinde107 reputationPosted Mar 20, 2015, 1:15 AM EDT
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 ZeeshanRank #60 · 27.6K reputationPosted Mar 20, 2015, 2:43 AM EDT
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.