سؤال

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

هل كانت مفيدة؟

المحلول

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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top