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

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -