The problem is that it getJSONis making a request GETto the server. To transfer entire objects you need to execute a requestPOST .
GET JavaScript, jQuery Ajax, URL- , , p >
$.ajax({
url: "/someurl/getbenchmarkdata",
data: JSON.stringify({ filterValue: "test" }),
type: "GET"
...
});
public SomeObject GetBenchMarkData(String filterValue)
{
...
}
, , ajax POST,
$.ajax({
url: "/someurl/benchmarkdata",
type: "POST",
data: JSON.stringify({ title: "My title"}),
dataType: "json",
contentType: "application/json; charset=utf-8",
...
});
Title String.
.