dasel
dasel copied to clipboard
Support a terminal view and traversal path discovery
Is your feature request related to a problem? Please describe. When working with a big and non flat data stored in JSON/YAML/XML, it is not always comfortable to examine the data when it is expended automatically and/or find the JSON/YAML/XML traversal path (select query) to select the data
Describe the solution you'd like It would be nice if dasel would support a terminal view (folding/expanding of nested object, coloring, etc) while assisting in displaying\discovering the traversal path which is examined, in the same spirit as fx does (see path discovery at the bottom)
Describe alternatives you've considered There are other tools which has a support for these features. E.g. fx, though it is inconvenient to use other tools since:
- Each tool needs to be installed separately
- Each tool has its own traversal path syntax per a data structure
Yet, there is no single tool like dasel, which supports the same traversal path (select query) for all supported data structures (file types)
Additional context I assume that dasel uses the same data structure when parsing each type (JSON/YAML/XML/etc.), thus displaying this data structure on the terminal and be able to traverse it while discovering the traversal path might be a killer feature
Dasel does use the same data structure, although we'd need to settle on a single display format which may be a little strange if viewing XML data and it displays in a JSON-like format.
That said, I do think this is a cool feature and worth adding in the future. I've not done anything like this before so am open to suggestions/PR's
we'd need to settle on a single display format
regardless of how it will be displayed (all could be natively treated as a trees), the display could be traversed and show the traversed path.
@TomWright maybe it is feasible to "port" fx display, which is written in golang.