I have the following string. I am getting the following error. Could you please let me know what could be wrong?
Unexpected character encountered while parsing value: C. Path '', line 0, position 0.
JsonTextReader error: System.Exception {Newtonsoft.Json.JsonReaderException}
Here is the JSON string I am getting from client.
Content-Type: application/json
Content-Disposition: attachment; filename="postData.json"
{"name":"test44","age":"66","gender":"B","dob":"10\/10\/2003","file":null}
Here is my code for parsing using JSON.NET.
JsonTextReader reader = new JsonTextReader(new StringReader(json));
while (reader.Read())
{
if (reader.Value != null)
Console.WriteLine("Token: {0}, Value: {1}", reader.TokenType, reader.Value);
else
Console.WriteLine("Token: {0}", reader.TokenType);
}