

-
As well as anyone's general thoughts/experiences, I'd appreciate opinions on the error handling mechanism jb uses to detect errors in upstream jb processes that jb is reading from.
Normally, detecting errors on the other end of a pipe requires care in a shell environment (e.g. retrospectively checking PIPESTATUS). I used an approach I've called Stream Poisoning. It takes advantage of the fact that control characters are never present in valid JSON. When jb fails to encode JSON, it emits a Cancel control character[1] on stdout. When jb encounters such a character in an input, it can tell the input it's reading from is truncated/erroneous. This avoids the typical problem of a pipe silently being read as an empty file.
I've got a page explaining this with some examples here: https://github.com/h4l/json.bash/blob/main/docs/stream-poiso... I can imagine using control characters in a text stream being rather controversial, but I feel it works quite well in practice.
[1]: https://en.wikipedia.org/wiki/Cancel_character
-
CodeRabbit
CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
-
Similar to jo, which is written in C [1]
[1] https://github.com/jpmens/jo
-
I wonder if I could use this on my project which uses multiple glue functions to piece together JSON strings. https://github.com/fieu/discord.sh
-
jc
CLI tool and python library that converts the output of popular command-line tools, file-types, and common strings to JSON, YAML, or Dictionaries. This allows piping of output to tools like jq and simplifying automation scripts.
How is this different to this https://github.com/kellyjonbrazil/jc
-
Appreciated, Slightly related: https://github.com/bashtools/JSONPath.sh
-
Nutrient
Nutrient – The #1 PDF SDK Library, trusted by 10K+ developers. Other PDF SDKs promise a lot - then break. Laggy scrolling, poor mobile UX, tons of bugs, and lack of support cost you endless frustrations. Nutrient’s SDK handles billion-page workloads - so you don’t have to debug PDFs. Used by ~1 billion end users in more than 150 different countries.
Related posts
-
Show HN: Pomoglorbo, a TUI Pomodoro timer for your terminal
-
Elvish, expressive programming language and a versatile interactive shell
-
Xonsh: Python-powered, cross-platform, Unix-gazing shell
-
Nb – note taking and archiving on the command line
-
Nb: CLI+web note/todo/bookmark/kb app in a single portable script