Information générale
Catégorie:
Client-side développement
Versions des environnements
Network:
Windows 2003 Server
>Hi everybody,
>
>I am wondering when do I need to use this attribute and what exactly does this attribute do.
>
>Say, I want to have a property in my model that I am going to set in JavaScript code to pass back to the server. I don't want to retrieve that property.
>
>So, is this property a good candidate for this attribute?
>
>Thanks in advance.
JsonIgnore is used to prevent a property in your model from being serialized to JSON. Use it when you don't want to send that property to the client via JSON. Your property will still be retrieved when you fetch it from the database (unless you have a projection that doesn't include that property).
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement