controlling columns to include in serialization

Topics: Web Api
Nov 14, 2011 at 8:57 AM

Hi,

Our requirement is during the service call client will specify the columns that he want to include in serialization. Some thing like OData Select query option. Any ideas on this ?

Thanks,

Sri Harsha

Nov 14, 2011 at 9:34 AM

Is Formatters the way to go for doing this ?

Nov 14, 2011 at 9:46 AM

We created a formatter that
uses automapper to convert entities to dtos, that have fewer columns.

/kzu from mobile

On Nov 14, 2011 7:34 AM, "shghanta" <notifications@codeplex.com> wrote:

From: shghanta

Is Formatters the way to go for doing this ?

Read the full discussion online.

To add a post to this discussion, reply to this email (wcf@discussions.codeplex.com)

To start a new discussion for this project, email wcf@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

Nov 14, 2011 at 10:54 AM

In our case client specifies the columns that needs to be included in the serialization. It should not be a static entity.

Nov 14, 2011 at 11:54 AM
Edited Nov 14, 2011 at 11:54 AM

You may consider to use JsonValue as return type.

Due to JsonValue/JonObject dictionary-like structure, it becomes pretty easy to manage "columns" - "properties" within return type

Nov 14, 2011 at 12:01 PM

It solves the problem, but we specifically need it in multiple formats.