AcspNet.Json [Obsolete]
This project is renamed to "Simplify.Web.Json" and moved to https://github.com/i4004/Simplify.Web.Json
AcspNet.Json
is a package which provides JSON controller response for controllers and JSON view model binder for AcspNet web-framework.
Package status
Latest version | |
---|---|
Dependencies |
Build status
Platform | Status of last build |
---|---|
.NET (4.5) | |
Mono (3.8.0) |
Examples
Using JSON controller response
Framework execution will be stopped and object will be parsed to JSON string and sent to client
public class MyController : Controller
{
public override ControllerResponse Invoke()
{
return new Json(myObj);
}
}
Using JSON view model binder
Registering binder:
public void Configuration(IAppBuilder app)
{
...
HttpModelHandler.RegisterModelBinder<JsonModelBinder>();
app.UseAcspNet();
}