<div class="jb51code">
<pre class="brush:js;">
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "application/json";
context.Response.ContentEncoding = Encoding.UTF8;
Stream inputStream = context.Request.InputStream;
Encoding encoding = context.Request.ContentEncoding;
StreamReader streamReader = new StreamReader(inputStream,encoding);
string st<a href="https://www.jb51.cc/tag/rjson/" target="_blank" class="keywords">rjson</a> = streamReader.ReadToEnd();
P<a href="https://www.jb51.cc/tag/ara/" target="_blank" class="keywords">ara</a>m p = JsonConvert.DeserializeObject<Param>(st<a href="https://www.jb51.cc/tag/rjson/" target="_blank" class="keywords">rjson</a>);
int top = Convert.ToInt32(p.Top);
string term = p.Term;
//var result = ...
//context.Response.Write(result.ToJson());
}
Source Code