It's simple enough to pass a string to a controller action via jQuery ajax, but is it possible to serialize a group of variables into an object, send it to the controller, and have the controller recognize it as an object?
For example:
In the server, you have a class Obj as such:
class Obj{
string a; int b; double c;
}
And in the controller, you have a method that is expecting an Obj object
public JsonResult UpdateObj(Obj obj){
//stuff
}
Is there a way in Jquery to serialize some JavaScript vars into a class Obj and then send it to an MVC controller action via an AJAX post?