Closed antonkomarev closed 4 years ago
It would be great to have additional flag for the kafkactl consume to display pretty printed JSON.
kafkactl consume
Raw JSON:
{"type":"UserStatusChanged","id":"e886eb90-4003-4b1f-9971-8f4bdb23dc89","timestamp":1588167444,"data":{"user":{"id":331,"status":"approved"},"from_status":"created","to_status":"approved","changed_at":"2020-04-29T13:37:18+00:00"}}
Pretty printed JSON:
{ "type": "UserStatusChanged", "id": "e886eb90-4003-4b1f-9971-8f4bdb23dc89", "timestamp": 1588167444, "data": { "user": { "id": 331, "status": "approved" }, "from_status": "created", "to_status": "approved", "changed_at": "2020-04-29T13:37:18+00:00" } }
It might be useful on development phase for debugging the messages.
It could be solved by using jq:
jq
kafkactl consume my-topic | jq .
It would be great to have additional flag for the
kafkactl consume
to display pretty printed JSON.Raw JSON:
Pretty printed JSON:
It might be useful on development phase for debugging the messages.