JSON Serialization Property Names

Topics: Web Api
Oct 6, 2011 at 4:01 PM

Hi

Sorry if this is an obvious one but cant find answer.  How can I override the names of my properties when serializing my object to json i.e. the equivalent of XmlElement attribute?

Thanks

Mark

Coordinator
Oct 6, 2011 at 4:50 PM

Use DataMemberAttribute.

Daniel Roth

From: ispypie [email removed]
Sent: Thursday, October 06, 2011 8:01 AM
To: Daniel Roth
Subject: JSON Serialization Property Names [wcf:274994]

From: ispypie

Hi

Sorry if this is an obvious one but cant find answer. How can I override the names of my properties when serializing my object to json i.e. the equivalent of XmlElement attribute?

Thanks

Mark