我有一个问题,我需要从其中包含$的wcf restful服务输出对象。我试过输出字典,但是当序列化为JSON时,$ gets会被编码。我正在与之通信的服务要求对象看起来像这样[{$ name:value}]
是否可以在运行时更改参数的data member属性中的Name?
[DataMember(Name = "RenameMe")]
public string Values { get; set; }
public Variable(string name, string values)
{
this.Values = values;
[set the name attribute to : "$name"]
}