title: How to sanitize JSON input parameters when using MVC4 ApiController?
body: <p>I had built an HTML sanitizer based on AntiXSS to automatically sanitize user input strings by overriding the default model binder, which works fine on standard post requests. However when using the new ApiController the default model binder never gets called, and I think it is because this new MVC controller uses the JSON formatter instead to bind the input data from the body of the request.</p>
  
  <p>So how would one go about extending the formatter so that I can modify the string properties after they have been bound by JSON? I'd rather not have to implement this at the controller level and there should be a way to do it before it even gets to the controller.</p>