-2

I have a model like this enter image description here

when I Deserialize this object, i want to get a Lower case json like this enter image description here

what should I do, if you have some ideas,please tell me ,thank you !

juharr
  • 31,741
  • 4
  • 58
  • 93
Share
  • 1
  • 4
    Please do not show your code as a picture. Edit your question to replace it by code cut and pasted from the IDE. Once you have, select it and press Ctrl-K to format it as a code block. And see [how to ask a question.](http://stackoverflow.com/help/how-to-ask) – Roman Marusyk Mar 12 '18 at 16:08
  • 1
    Deserialize? Do you mean Serialize *to* JSON? Are you serializing to a string, or is this as part of an API? – Devin Goble Mar 12 '18 at 16:09
  • 3
    Possible duplicate of [How can I change property names when serializing with Json.net?](https://stackoverflow.com/questions/8796618/how-can-i-change-property-names-when-serializing-with-json-net) – FakeCaleb Mar 12 '18 at 16:10

1 Answers1

2

Assuming you meant serialise instead of deserialise...

[JsonProperty("id")]

Decorate the property using the following attribute, example for Id.

FakeCaleb
  • 982
  • 8
  • 19