Live data from Hacker News

Show HN: Jless, a command-line JSON viewer

pauljuliusmartinez.github.io

81–90 of 91 posts

Re: Show HN: Jless, a command-line JSON viewer

#82

on a related note, where do people find artists to make logos/mascots like that?

I browsed Fiverr to find a few artists whose styles were similar to what I had in mind, then messaged a few of them. annatgraphics [1] was able to take my crude color pencil sketches and turn them into the slick art you see today!

[1]: https://www.fiverr.com/annatgraphics

Re: Show HN: Jless, a command-line JSON viewer

#84
FWIW I was unable to install it on Mac using cargo which compiles it from Rust. Here is the error I got.

    error[E0658]: or-patterns syntax is experimental
       --> /Users/xxxx/.cargo/registry/src/github.com-1ecc6299db9ec823/jless-0.7.1/src/app.rs:101:26
        |
    101 |                 KeyEvent(Key::Ctrl('c') | Key::Char('q')) => break,
        |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = note: see issue #54883  for more information

    error[E0658]: or-patterns syntax is experimental
      --> /Users/xxxx/.cargo/registry/src/github.com-1ecc6299db9ec823/jless-0.7.1/src/jsonparser.rs:67:24
       |
    67 |         while let Some(JsonToken::Whitespace | JsonToken::Newline) = self.peek_token_or_eof() {
       |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       |
       = note: see issue #54883  for more information

    error: aborting due to 2 previous errors

    For more information about this error, try `rustc --explain E0658`.
    error: failed to compile `jless v0.7.1`, intermediate artifacts can be found at `/var/folders/7n/jbbdpxnj373d5trx65_bryhr0000gr/T/cargo-installUE4dQ5`

    Caused by:
      could not compile `jless`

Re: Show HN: Jless, a command-line JSON viewer

#85
post #67

I'd love to see YAML support. I can see this being useful on a daily basis for everyone who works with Kubernetes. It's so useful that I'm going to dedicate next episode of my 100 Kubernetes Tool series to this. [1] [1] https://youtube.com/playlist?list=PLxKcdWncGLlNiWC71kKwDj3OZ...

Theres some 'jq for yaml/toml' projects that just convert to and from json and then use jq in the middle, seems like that would work here too.

Yeah, you can also get kubectl to output json directly

Re: Show HN: Jless, a command-line JSON viewer

#86

FWIW I was unable to install it on Mac using cargo which compiles it from Rust. Here is the error I got. error[E0658]: or-patterns syntax is experimental --> /Users/xxxx/.cargo/registry/src/github.com-1ecc6299db9ec823/jless-0.7.1/src/app.rs:101:26 | 101 | KeyEvent(Key::Ctrl('c') | Key::Char('q')) => break, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #54883 for more information error[E0658]: or-patterns synt…

Seems like your Rust version is a bit out of date. Nested or-patterns have been stabilised in Rust 1.53.0, which came out back in June.

Re: Show HN: Jless, a command-line JSON viewer

#87
This looks really good! Thanks a lot.

What i am always missing (fx & friends) is a preview and gradual expand. If you should feel inclined, you may want to look at jsonui[1] which has this (with C => e e e). Even if it is rather crude, I always come back to if for these two features

[1] https://github.com/gulyasm/jsonui

Re: Show HN: Jless, a command-line JSON viewer

#88
post #78
post #77

Earlier quoted context omitted.

I mean that if asciinema examples in the readme tends to get outdated (ed2: "stale") , they should be kept up to date via CI and (probably) be part of the integration tests; if a commit changes the ux/interaction tests should reflect that, and documentation should be easily (automatically) updated? Ed: like if you for a web app have selenium/browser tests that somehow also takes screenshots that become part of the do…

Ah, I see. That's probably a bit too much tooling for a small OSS utility, manual updates would get me a long way there. The other issue is that it doesn't matter that the UI is exactly up to date, just good enough to give the user an idea of the functionality.

It's a generally good idea though, website screenshots (and thinking about it now, animations) from test automation is another similar task.

Not quite standard practice, though some people do bits of it here and there, but both probably should become so which would amortize the cost over lots of cli tools.

Re: Show HN: Jless, a command-line JSON viewer

#89
post #47

This is great! I use the JSONVue Chrome extension at work to display JSON files, and I can see the similarities. If I could suggest one thing: ctrl-u and ctrl-d are pretty common shortcuts for page up and page down, they're even supported in Vim and less. It would make sense to add support for those in addition to the actual PageUp/PageDown keys.

Maybe hijacking the thread, but if you prefer to stay in the browser give also a try to Virtual Json Viewer extension [1][2]. I developed it to navigate large json files at work and it also integrates JQ. unrelated: this is my very first comment on HN, hurray! [1] Chrome Web Store: https://chrome.google.com/webstore/detail/virtual-json-viewe... [2] Github: https://github.com/paolosimone/virtual-json-viewer

I only saw your comment after a day and just tried your extension, it works great! I really like how much faster it is than JSONVue, and the JQ integration looks super useful; this is a really good start.

Oh and welcome to HN :)

Re: Show HN: Jless, a command-line JSON viewer

#90

What are the odds that 3 separate, years-old accounts came out of the woodworks within the last hour to make their only comments of all time to support this post? 3/14 of the only comments as I make this... https://news.ycombinator.com/item?id=30275812 https://news.ycombinator.com/item?id=30280084 https://news.ycombinator.com/item?id=30277488

I have no idea about the odds and didn't bother to look up the timeline but I can give you some anecdata and tell you exactly why I might have theoretically been the 4th lurker-become-excited-commenter for this post, were I to read this first on the computer instead of on my phone (and nearer real time than on a following weekend) and less hesitant to post comments in general:

I find json to be a PITA to parse as a human when looking at getting a bigger picture or keys/values that are strewn away from each other and not just e.g. two values next to each other. Anytime I have to do something with it, I have to search through my history to dig out some jq invocation and then try to tweak it correctly to do what the (most of the time similar but also different enough) task at hand needs. My mind sadly just seems to be unable to sufficiently grok jq.

So when I read here about jless I was stoked and the excitement was strong enough to want to dig out my login credentials and make a comment along the lines of "This is AWESOME! Thank you so much for making life easier!". In the end, when I logged in on the computer and had reflected more, I opted to upvote a comment instead and then saw this thread; so thank you, I guess, for providing me an opportunity or excuse to express my enthusiasm in addition to that.

I consider my discovery of jless (which sadly I was apparently not able to make on my own while searching the internet for json tools previously - so yay for lurking on HN :-) - but it might also partly be the relative (to my predicament) youth of the tool) of similar importance to me as macros in vim or back in the days using bluefish for editing HTML as they all save my time being spent on doing tooling to do things and instead allow it to being spent on doing things directly. (BTW thanks to all these devs!)

Just my 2 cents :-) (and I'm not particularly interested in starting or partaking in any further discussion)

Post reply on HN