asp.net - Expose few property of class at runtime in WCF service -


i have class ex user class in wcf service, in have 10 properties fname, lname, servicestatus, errormessage etc.

now there method in service retrieve user info giving valid json input , gives output in json format (here exposing user class object).

now problem: - when expose user class got properties in json output. there few cases don't want expose properties. in cases want expose 2 properties, or in few cases properties. want make json output more clear.

is possible in wcf? please help.

either don't put [datamember] attribute or add [ignoredatamember] attribute property not want expose.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -