OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Json Ignore properties during runtime

  • Thread starter Thread starter Dilshod
  • Start date Start date
D

Dilshod

Guest
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.
<p>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. </p>
Continue reading...
 

Latest posts

I
Replies
0
Views
1
impact christian
I
Top