Partial JSON Response for REST webservices

Mar 23, 2012 at 1:15 PM

I'am trying to implement a REST webservice  supporting partial responses for resources something like Google does with their APIs (

The  API  client will issue requests in which he will specify specific resource properties that he wishes in response:


The fields parameter is optional and is used to specify the list of fields from the resource which you want returned. For the API, I plan to use only JSON representations and I was thinking to use JSON.NET for serialization.

Is it possible to control which fields JSON.NET library serializes in JSON format based on a list? Currently I am evaluating the implementation of the APIs either using ASP.NET MVC or Web API.