Newtonsoft.Json.JsonReaderException: Unterminated string. Expected delimiter Newtonsoft.Json.JsonReaderException: Unterminated string. Expected delimiter json json

Newtonsoft.Json.JsonReaderException: Unterminated string. Expected delimiter


I noticed that this seems to be a base64 encoded JPEG. In most cases it would be better & easier to have your server send back the jpeg rather than JSON.

public ActionResult ShowImage() {    var file = Server.MapPath("~/App_Data/UserUpload/asd.png");    return File(file, "image/png", Path.GetFileName(file));}

To see original source follow this link.


Troubleshooting advice:

If you are unable to put the whole string, you may want to make it smaller to isolate the error.

Try removing a a block characters at a time (I would use a binary left/right half experimentation method) until it stops breaking. Then look closer at the bad half. If you can get the bad half small enough and are unable to see the error, please post it.

I am guessing the column given by the error isn't counted the same way that you are counting them.