add JSON support for /v1/endpoints (fixes mesosphere/marathon#28)