Remove format block and just render json.

Remove duplicate code after seeing code climate output.