↧
Answer by dbc for Discarding garbage characters after json object with Json.Net
You can also set JsonSerializerSettings.CheckAdditionalContent = false to tell the serializer to ignore any content after the end of the deserialized JSON object:var result =...
View ArticleAnswer by Alberto Chiesa for Discarding garbage characters after json object...
I knew there had to be a simple and robust way: public T ReadTypeAndDiscardTheRest<T>(string json) { using (var sr = new StringReader(json)) using (var jsonReader = new JsonTextReader(sr)) { var...
View ArticleDiscarding garbage characters after json object with Json.Net
I have to consume a so called web service implemented by a dumb monkey which is returning some garbage after the proper Json response.Something like this:{"Property1": 1,"Property2": 2,"Property3":...
View Article
More Pages to Explore .....