Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format JSON by default. Fixes #2243. #2614

Merged
merged 1 commit into from
Nov 25, 2014
Merged

Conversation

bgrant0607
Copy link
Member

No description provided.

@bgrant0607
Copy link
Member Author

Examples:

$ curl --insecure localhost:8080/api/v1beta1/services/redis-master
{
  "kind": "Status",
  "creationTimestamp": null,
  "apiVersion": "v1beta1",
  "status": "Failure",
  "message": "service \"redis-master\" not found",
  "reason": "NotFound",
  "details": {
    "id": "redis-master",
    "kind": "service"
  },
  "code": 404
}$ curl --insecure localhost:8080/api/v1beta1/services/redismaster
{
  "kind": "Service",
  "id": "redismaster",
  "uid": "9e9b8017-74ef-11e4-b8d5-42010af0715c",
  "creationTimestamp": "2014-11-25T22:08:43Z",
  "selfLink": "/api/v1beta1/services/redismaster",
  "resourceVersion": 8,
  "apiVersion": "v1beta1",
  "namespace": "default",
  "port": 6379,
  "protocol": "TCP",
  "labels": {
    "simpleservice": "redismaster"
  },
  "selector": {
    "simpleservice": "redismaster"
  },
  "containerPort": 6379,
  "portalIP": "10.0.0.28"
}

@bgrant0607 bgrant0607 added area/api Indicates an issue on api area. area/usability labels Nov 25, 2014
@dchen1107
Copy link
Member

Nice! LGTM.

@@ -286,9 +287,17 @@ func writeJSON(statusCode int, codec runtime.Codec, object runtime.Object, w htt
errorJSON(err, codec, w)
return
}
// PR #2243: Pretty-print JSON by default.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: 2243 is an issue not a PR.

thockin added a commit that referenced this pull request Nov 25, 2014
Format JSON by default. Fixes #2243.
@thockin thockin merged commit 26ec89c into kubernetes:master Nov 25, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api Indicates an issue on api area. area/usability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants