[英]Alternate to Jayrock's ExportToString
I am using Jayrock.Json.Conversion.JsonConvert.ExportToString(myObj);
我正在使用
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
因此,如果我将
FirstName
作为myObj
的属性,则得到的字符串具有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. 这与我正在使用的jquery模板不太匹配,该模板具有备用数据源,且该数据源具有大写的第一个字符属性名称。
I understand that they introduced JsonMemberNameAttribute
that may take care of this issue, but I was wondering if there's an alternate json serializer. 我了解他们引入了
JsonMemberNameAttribute
来解决此问题,但我想知道是否还有备用json序列化程序。
PS: I am using .NET 4.0 PS:我正在使用.NET 4.0
我使用了System.Web.Script.Serialization.JavaScriptSerializer
序列化程序,它可以按预期工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.