Пример #1
0
 protected static JObject DeserializeQueryString(HttpActionContext actionContext)
 {
     using (Stream stream = ModelBinderUtils.QueryStringToStream(actionContext.Request.RequestUri.Query)) {
         return(ModelBinderUtils.DeserializeJsonStream(stream));
     }
 }
Пример #2
0
        protected static JObject DeserializeJsonContent(HttpActionContext actionContext)
        {
            Stream stream = actionContext.Request.Content.ReadAsStreamAsync().Result;

            return(ModelBinderUtils.DeserializeJsonStream(stream));
        }