Base solution for your next web application
Open Closed

Lowercase property names in WebApi #6429


User avatar
0
velu created

Hi,

How to set lowercase or Uppercase properties name in Webapi

Thanks.

Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)

3 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @velu,

    You can add [JsonProperty("name")] or [JsonProperty("NAME")] attribute to your fields.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    velu created

    Hi,

    Is there any way to set this globally to convert all properties to uppercase or lowercase.

    Thanks

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    maliming created
    Support Team

    You can refer to this: https://github.com/aspnetboilerplate/aspnetboilerplate/issues/3588#issuecomment-402696300

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)