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

Support pretty-print of JSON via HTTP API #643

Closed
wants to merge 1 commit into from
Closed

Support pretty-print of JSON via HTTP API #643

wants to merge 1 commit into from

Conversation

otoolep
Copy link
Contributor

@otoolep otoolep commented Jun 13, 2014

Spot-check unit tests added.

@otoolep
Copy link
Contributor Author

otoolep commented Jun 13, 2014

I find this to be very useful when working directly with the API -- it's much easier on the eyes to be able to get:

$ curl -G 'http://localhost:8086/db/test1/series?u=root&p=root&pretty=true' --data-urlencode "q=select * from hd_used"
[
    {
        "name": "hd_used",
        "columns": [
            "time",
            "sequence_number",
            "host",
            "mount",
            "value"
        ],
        "points": [
            [
                1402627488062,
                50001,
                "serverA",
                "/mnt",
                23.2
            ]
        ]
    }
]
$ curl 'http://localhost:8086/cluster/shards?u=root&p=root&pretty=true'
{
    "longTerm": [],
    "shortTerm": [
        {
            "endTime": 1403136000,
            "id": 1,
            "serverIds": [
                1
            ],
            "startTime": 1402531200
        }
    ]
}

@otoolep
Copy link
Contributor Author

otoolep commented Jun 13, 2014

FWIW -- I do wish I could see a way to configure the output code in few places, but I don't see a clear way. This doesn't seem too bad.

@tisba
Copy link

tisba commented Jun 13, 2014

That is a great idea! I'd love to see this being merged. Thanks!

Spot-check unit tests added.
@otoolep
Copy link
Contributor Author

otoolep commented Jun 17, 2014

Any other feedback on this? Go or no-go?

@jvshahid jvshahid closed this in c89f03d Jun 18, 2014
@jvshahid
Copy link
Contributor

Thanks @otoolep. The change is merged into master.

@jvshahid jvshahid added this to the 0.7.4 milestone Jul 7, 2014
@jvshahid jvshahid modified the milestones: 0.8.0, 0.7.4 Jul 24, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants