Posted on Sunday June 6, 2010

Silverlight JSON WebClient wrapper/helper

This is a small class that uses the NewtonSoft JSON.NET library to make JSON requests to a URL. It handles both requests that require parameters, and those that just return results (for example a GetProducts() call).

I chose NewtonSoft over the default Microsoft JSON deserializer as it handles nested objects and doesn’t require attributes on your domain objects.

The class probably needs a few tweaks to be completely production-ready.