You are doing everything right.
I am not one of the developers of MVC developers, but I think that it was decided not to introduce d-wrapper in favor of compatibility with the rest of the world.
However, they took a step towards providing json responses. By default, you cannot return Json in response to a GET request, so you have to add additional conditions to your code:
public JsonResult GetJsonData() { return Json(2, JsonRequestBehavior.AllowGet); }
If you want to pass a Json array with sensitive data back to the GET request, then yes, you have to manually wrap the array.
source share