考虑遵循以JSON接收和返回数据的WCF方法。
public IDictionary<string, string> GetData(IDictionary<string, string> input)
{
input.Add("newKey","newValue");
input.Add("newKey2","newValue2");
return input;
}
有没有办法通过和;以格式检索JSON:
[{"newKey":"newValue","newKey2":"newValue2"}]
而不是:
[{"Key":"newKey","Value":"newValue"},
{"Key":"newKey2","Value":"newValue2"}]