In my sample asp.net MVC application , when ever user makes an AJAX call from browser , I would like to return data in JSON format mentioned below.
{
    "success":true,  // true or false
    "errorMessage":"", // errorMessage if there is any error
    "data": { } //this value will depend on the action method called
}
To return response in this format , I create an anonymous type in all action methods and then serialize it to JSON.
public ActionResult GetAuthors()
{
    List<BookStoreAdmin.ViewModels.Author> authors = BookStoreAdmin.BAL.Author.GetAuthors();
    var response = new { success = true, errors = "", data = authors };
    return Json(response, JsonRequestBehavior.AllowGet);
    // return Json(authors, JsonRequestBehavior.AllowGet);
}
Now , my question is there any better way or correct way to do this , instead of creating anonymous type in all action methods ?