grpcurl icon indicating copy to clipboard operation
grpcurl copied to clipboard

Allow to use yaml instead of json

Open anti-social opened this issue 2 years ago • 1 comments
trafficstars

Yaml is more convenient for writing and modifying big chunks of data. So my suggest is to add yaml support.

It is possible to do in 2 ways:

  • add an option like -data-yaml (possibly with a short version -Y) for using instead of -d
  • autodetect yaml if there is a --- mark in the first line of data

anti-social avatar Apr 22 '23 18:04 anti-social

As a work-around, you can use the tool yq and pipe your input through that and into the stdin of grpcurl. IIRC, yq . will print the input as JSON.

jhump avatar Apr 24 '23 13:04 jhump