JSON.NET and Silverlight

Aug 10, 2010 at 2:03 PM
I noticed JSON.NET for silverlight is 264 kb. I usually work hard on minimizing the size of Silverlight app to reduce server load and reduce load times for my users. 264 kb for JSON parsing is a tad too much IMO. My question is then: Would it be easy to filter out only the JSON reader (and potentially the BSON reader) for a more timid assembly size. Regards, Mårten
Aug 12, 2010 at 2:45 AM

Sure. It might be a lot of work but I'm sure you could cut various parts of Json.NET out to reduce its size.

Sep 3, 2010 at 5:48 PM

Hey Marten,

Did you get anywhere with this?  I'm in the same boat - want to use an established JSON parser but would rather not have to download the whole 264kb :)

Sep 3, 2010 at 6:00 PM
Edited Sep 3, 2010 at 6:09 PM
No I didn't delve into that partly because it was said to be a lot of work and SVN IMO makes patching a bit tough.
Just FYI I've made a microparser framework. I've implemented JSON parsing in that according to the spec at www.json.org. While there obviously might be some oversights (its alpha) it works for my cases.
If you want to you can try the silverlight sample. It's around 30kb IIRC.
PS. I can't claim it fulfill your wishes of being an established JSON serializer.