jmespath / jmespath.terminal

JMESPath exploration tool in the terminal
Other
458 stars 54 forks source link

Accept yaml file as input #22

Closed filipenf closed 2 months ago

filipenf commented 4 years ago

Allows loading yaml files as well as json from the command line. I tested a few cases of loading json/yaml with:

jpterm -y yaml-file.yaml
jpterm -y json-file.json

and even

jpterm -y json-file.json

works as the yaml library can load json format as well

Tested with a few different combinations of json and yaml files - both on stdin and passing the file path as an argument

$ cat test.yml 
---
name: value
list:
  - item 1
  - item 2
dict:
  a: 1
  b: 2
  c: 3

$ jpterm -y test.yml

screen-20201020-1138

filipenf commented 4 years ago

@jamesls would you be interested in adding yaml support to jpterm?