cli icon indicating copy to clipboard operation
cli copied to clipboard

cf curl JSON output is not consistent

Open cf-services opened this issue 12 years ago • 6 comments

We noticed that some endpoints have a nicely formatted JSON response, while others do not.

cf curl /v2/services => nicely formatted JSON cf curl /v2/service_brokers => unintelligible blob of JSON

cf-services avatar Feb 21 '14 22:02 cf-services

We have created an issue in Pivotal Tracker to manage this. You can view the current status of your issue at: http://www.pivotaltracker.com/story/show/66260020

cf-gitbot avatar Feb 21 '14 22:02 cf-gitbot

This is a CloudController issue. We created a story in the Services Public icebox, and we'll close this issue.

Thanks, CF Community Pair (@stupakov, @mbhave)

stupakov avatar May 15 '14 00:05 stupakov

Interestingly enough, the JSON can be parsed and formatted entirely from the CLI with a pretty simple hack. Here is an example: http://play.golang.org/p/b1V2CcMqsa

ryanmoran avatar May 15 '14 03:05 ryanmoran

We take what the CC gives us. But we are looking to fix this.

https://www.pivotaltracker.com/story/show/71425006

lcddave avatar May 16 '14 02:05 lcddave

https://www.pivotaltracker.com/story/show/71425006 has been committed and accepted.

lcddave avatar May 19 '14 15:05 lcddave

5 million bonus internet points for @ryanmoran for pointing me in the direction of Golang's json.Indent method, which is awesome.

tjarratt avatar May 19 '14 17:05 tjarratt