Property name changed (to lowercase)

I have a custom model in my project that not related to database table. Here's my code in a function in ServerMethodController.cs:

var data = new Models.CustomModel();
data.FirstLine = "test";
data.SecondLine = "demo";
return Json(new { err, message, data });

and the result become:

data.firstLine = "test"
data.secondLine = "demo"

Is it really intended behaviour?

Because when I execute a server method that returns a recordset, the first character in the property name still an uppercase.


This is not related to Radzen at all:

Even though this is not related to Radzen we have it mentioned in our documentation:

public IActionResult OrdersByCity()
    var orders = northwind.Orders.GroupBy(o => o.ShipCity)
                 .Select(group => new {
                    ShipCity = group.Key,
                    Count = group.Count()

    // Using DefaultContractResolver to preserve the property
    // name casing when serializing the result to JSON.
    return Json(new { value = orders }, new JsonSerializerSettings() {
       ContractResolver = new DefaultContractResolver()

Okay, thanks for the replies.

To be honest I dont read the documentation, just jump to radzen and then search if theres a problem. And this problem don't have any special section.

Thank you.

We can't document any possible problem a developer may hit with their custom code. We document (and support) Radzen specific features and behavior.

Yup, I understand that, Just mentioned in my reply that I miss that information because I dont read throughly. And its clearly the behaviour is not designed by Radzen team :slight_smile: