Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 3667

Json Ignore properties during runtime

$
0
0

I have an Web Service that returns object based on requests received from the client. Lets say based on the user rights, I would like hide some property values from the client. I have a solution: I can clone the object that needs to be sent, but exclude the properties that are needed during the clone and send. So far this is the best solution I have found, but I am wondering if there are any other ways where i can specify the list of properties to a Json serializer so that it does it for me automatically.


Viewing all articles
Browse latest Browse all 3667

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>