PaulJuliusMartinez / jless

jless is a command-line JSON viewer designed for reading, exploring, and searching through JSON data.
https://jless.io
MIT License
4.78k stars 92 forks source link

show comments in yaml files #164

Open theblop opened 3 months ago

theblop commented 3 months ago

Is it possible to toggle comments in yaml files? It would be super useful for large commented yaml config files (e.g. helm chart value files)

Thanks!

andres-lowrie commented 3 weeks ago

Hey so this works with at least version 0.9.0

some file foo.yaml


---

key:

key2:


and then doing 

jless -m line foo.yaml



yields 

```json
{
  "key": [
    "value",
    "value",
    "value"
  ],
  "key2": [
    {
      "object": {
        "key": "value"
      }
    },
    {
      "object": {
        "key": "value"
      }
    },
    {
      "object": {
        "key": "value"
      }
    }
  ]
}