am trying to consume json strings inside asp.net and google told me about this Json.NET library.
I have the following json from a php webservice:
"[{\"AccountID\":\"demo\",\"UserID\":\"1\",\"Password\":\"*blank*\",\"Active\":\"1\",\"Name\":\"\"}][{\"AccountID\":\"demo\",\"UserID\":\"1\",\"Password\":\"*blank*\",\"Active\":\"1\",\"Name\":\"\"}]"
i found that the library cannot load urls so i had to use System.Net.WebClient; ok so far. The problem is that doing
var json = webClient.DownloadString(url); //gives the json above
object user = JsonConvert.DeserializeObject(json);
// or User user =JsonConvert.DeserializeObject<User>(json); wont work
wont work the library says "After parsing a value an unexpected character was encountered"
So, is my json malformed? i construct it with json_encode($resultset) from php, so i wonder whats going on.
my User object only has the properties i have on json.