I have a problem where i need to output an object from a wcf restful service with a $ in it. I've tried outputting a dictionary but when that serializes to JSON the $gets encoded. The service i am communicating with requires the object to look like this [{$name : value}]
Is it possible to change the Name in the data member attribute on a parameter at runtime?
[DataMember(Name = "RenameMe")]
public string Values { get; set; }
public Variable(string name, string values)
{
this.Values = values;
[set the name attribute to : "$name"]
}