Hello,
I'm trying to parse this json data, I'm getting this error:
Unexpected character encountered while parsing value: T. Path '', line 0, position 0
string result = service.Response.ToString();
The result data is shown in attached file.
string deserializeObj = JsonConvert.DeserializeObject(result).ToString(); // error
JObject j = JObject.Parse(deserializeObj);
same error if I try: JObject j = JObject.Parse(result);
JArray data = (JArray)j["users"];
var query = new List();
query = (from item in data
select new Followers
{
screenName = item["screen_name"].ToString().Replace("\"", ""),
profileImage = item["profile_image_url"].ToString().Replace("\"", ""),
userID = long.Parse(item["id"].ToString().Replace("\"", ""))
}).ToList();
return query;
Francis SusaimichaelPosted Oct 22, 2015, 11:05 PM
string deserializeObj = JsonConvert.DeserializeObject(result).ToString();
Also, the error you got will occur, once you try to process the invalid Json object. I have tested that one also, and received the same error you mentioned.
Rick FreemanPosted Oct 23, 2015, 11:12 AM
Rick FreemanPosted Oct 23, 2015, 10:48 AM