Quantcast
Channel: Discarding garbage characters after json object with Json.Net - Stack Overflow
Browsing latest articles
Browse All 3 View Live

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 Article


Answer 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 Article

Discarding 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
Browsing latest articles
Browse All 3 View Live




<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>