Domanda

I am using Jayrock.Json.Conversion.JsonConvert.ExportToString(myObj); and the resulting string converts the first character of the property name to a lower case. So, if I had FirstName as the property of myObj, the resulting string has firstName

This doesn't sit nicely with a jquery template I am using that has an alternate data source with upper case first character property names.

I understand that they introduced JsonMemberNameAttribute that may take care of this issue, but I was wondering if there's an alternate json serializer.

PS: I am using .NET 4.0

È stato utile?

Soluzione

I used the System.Web.Script.Serialization.JavaScriptSerializer serializer and it works as expected.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top