add TypeResource
use buildJsonResponse() instead of buildResultResponse()