skanehira / tson Goto Github PK
View Code? Open in Web Editor NEWTUI json editor and viewer written in Go
License: MIT License
TUI json editor and viewer written in Go
License: MIT License
I find it helpful when navigating any tree structure to be able to collapse and expand all nodes, but also go <-- (left) and --> (right) to move into & out of the structure's depth.
Right now, LEFT and RIGHT arrow keys only go UP and DOWN, but would you consider having LEFT and RIGHT jump directly to the adjacent parent/child node in that direction?
Also, the key bindings are really unintuitive for non-vim users. Could we consider using SPACEBAR and SHIFT-* (etc.) for certain actions like expanding/collapsing current node, jumping up or down a page or element, etc? I don't have anything too concrete in mind, but it's a little tricky to use right out of the box. I have to keep referencing the table in the readme, but I feel like I should just be able to figure it out with my arrow keys and spacebar and ctrl/shift keys.
Additionally, the "Collapse all nodes" (H) doesn't seem to be very helpful, as it just replaces everything with a .
... which I can then edit... anyway, I just think there's some room for significant improvement here in the UI.
Should be nice add info of how to navigate in terminal window
I know this sounds a bit crazy, but it would be great if this could be used as a library. Basically, separate out the parts of this tool that deal with the command line, and put the code that actually does the TUI stuff and tree nav in its own package.
For example (without having given it too much though), this would be very nice:
myJSON := []byte{...}
updatedJSON, err := tson.Edit(myJSON)
// a TUI screen would cover the terminal at this point,
// and relinquish itself when done editing, while
// returning the resulting JSON bytes
I could see myself embedding something like this into Caddy 2, which is configured entirely by JSON. But only if it can be used as a library like this.
Imagine starting up your web server in some interactive/dashboard mode, and being able to watch it in real-time in your terminal (kind of like what htop does, but just for your server), while being able to edit its configuration right there as well! Super useful for development too!
Anyway, I'm excited about this project, I hope you'll keep developing it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.