Below is a Json string
When I pastes it (the 1st and last characters, namely the double quote, are removed) in
JSON Formatter & Validator[
^]
for validation.
JsonString = "{\"ownerSysId\":\"MyIMG\",\"applicationId\":31000,\"uploadFiles\":[{\"id\":2121,\"path\":\"\\\\jServer.local\\gisprod\\Photos\\engineering\\A01\\A01\\PF(2)\\2019\",\"fileName\":\"\\E029089_02-21-2019_085353.png\",\"bearing\":\"none\",\"createdDate\":\"2019-01-03T08:59\"},{\"id\":2141,\"path\":\"\\\\jServer.local\\gisprod\\Photos\\engineering\\B02\\B02\\SHFT(VB4)\\2017\",\"fileName\":\"\\C020533_02-28-2019_131017.png\",\"bearing\":\"none\",\"createdDate\":\"2017-04-27T12:37\"}]}";
The errors received are
Strings should be wrapped in double quotes.
Using NotePad to remove all of the single back-slash, the text likes that below:
{"ownerSysId":"MyIMG","applicationId":31000,"uploadFiles":[{"id":2121,"path":"\\\\jServer.local\\gisprod\\Photos\\engineering\\A01\\A01\\PF(2)\\2019","fileName":"\\E029089_02-21-2019_085353.png","bearing":"none","createdDate":"2019-01-03T08:59"},{"id":2141,"path":"\\\\jServer.local\\gisprod\\Photos\\engineering\\B02\\B02\\SHFT(VB4)\\2017","fileName":"\\C020533_02-28-2019_131017.png","bearing":"none","createdDate":"2017-04-27T12:37\"}]}
it gets validated.
I have tried multiple string function to remove single back-slash, but not effective. I will appreciate if you can help for this issue.
What I have tried:
Tried
JsonValue.Replace("\\","")
but not working
Tried
JsonValue.TrimStart('\\').TrimEnd('\\')
but not working