C# 字符串数组的原始请求正文

C# 字符串数组的原始请求正文,c#,.net,encoding,C#,.net,Encoding,我有服务代码: [OperationContract] [WebInvoke(Method = "POST", UriTemplate = "/BTNMetadata/", BodyStyle = WebMessageBodyStyle.WrappedResponse, ResponseFormat = WebMessageFormat.Json)] public List<BtnMetaData> BTNMetadata() { WebOp

我有服务代码:

 [OperationContract]
    [WebInvoke(Method = "POST", UriTemplate = "/BTNMetadata/", BodyStyle = WebMessageBodyStyle.WrappedResponse, ResponseFormat = WebMessageFormat.Json)]
    public List<BtnMetaData> BTNMetadata()
    {
        WebOperationContext.Current.OutgoingResponse.Headers.Add("Cache-Control", "no-cache, must-revalidate");
        WebOperationContext.Current.OutgoingResponse.Headers.Add("Expires", "Sat, 26 Jul 1997 05:00:00 GMT");
        var x= Encoding.UTF8.GetString(OperationContext.Current.RequestContext
                      .RequestMessage.GetBody<byte[]>());
我想要的是:

8124318066
3869383310
9417395507
是否有.Net Framework编码方法来执行此操作?

找到了一个使用HttpUtility.UrlDecode的方法

var x = HttpUtility.UrlDecode("%5B%228124318066%22%2C%223869383310%22%2C%229417395507%22%5D");

看起来像URL编码。解码后是[812431806638693833109417395507],这是一个JSON字符串。在.NET库中有几种URL解码方法。@MattBurland,我在请求中发送了一个字符串列表。使用RestSharp。
var x = HttpUtility.UrlDecode("%5B%228124318066%22%2C%223869383310%22%2C%229417395507%22%5D");