Search code examples
asp.netjson.net-4.0xmltextreader

XmlTextReader for json?


Is there something that is similar to XmlTextReader in terms of performance, but using JSON instead?

I have the choice between parsing data in XML or parsing the same data in JSON. I'd like to use JSON because I figure I could save a bit of bandwidth but I'd like to keep the performance of XmlTextReader. In other words, how do I stream JSON data? Thanks.


Solution

  • The Json.NET project contains a JsonTextReader class that might be what you are looking for. Didn't use it myself though, so I can't give any specifics.