jsonpp-rs
jsonpp-rs copied to clipboard
Feature request: adds an end break line (-w)
Hi.
Consider the following test:
[user@host ~]$ curl -s http://localhost:8080/fiscalidade/v1/version | jsonpp
{
"status": "ok",
"result": {
"major": 0,
"minor": 6,
"patch": 2
}
}[user@host ~]$
Notice the output JSON doesn't contains an end empty line. With this new feature, it would allow to print as:
[user@host ~]$ curl -s http://localhost:8080/fiscalidade/v1/version | jsonpp <some-option-here>
{
"status": "ok",
"result": {
"major": 0,
"minor": 6,
"patch": 2
}
}
[user@host ~]$
The cURL tool contains a -w feature that is possible to do something like this:
[user@host ~]$ curl -s -w '\n' http://localhost:8080/fiscalidade/v1/version
{"status":"ok","result":{"major":0,"minor":6,"patch":2}}
[user@host ~]$
so, a good option to jsonpp tool could be:
[user@host ~]$ curl -s http://localhost:8080/fiscalidade/v1/version | jsonpp -w '\n'
{
"status": "ok",
"result": {
"major": 0,
"minor": 6,
"patch": 2
}
}
[user@host ~]$
WDYT?
thank you for your feature request!
sounds sensible to me. I'd be very willing to accept a pull request implementing this feature. Do you want to implement it? I will help you if you want :)
Awesome! :-) I'm going to send a PR implementing the feature ...