Show HN: Jb / json.bash – Command-line tool (and bash library) that creates JSON

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

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.
coderabbit.ai
featured
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.
www.nutrient.io
featured
  1. json.bash

    Command-line tool and bash library that creates JSON

    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

  2. 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.

    CodeRabbit logo
  3. jo

    JSON output from a shell

    Similar to jo, which is written in C [1]

    [1] https://github.com/jpmens/jo

  4. discord.sh

    Write-only command-line Discord webhooks integration written in 100% Bash script

    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

  5. 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

  6. JSONPath.sh

    JSONPath implementation in Bash for filtering, merging and modifying JSON

    Appreciated, Slightly related: https://github.com/bashtools/JSONPath.sh

  7. 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.

    Nutrient logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Show HN: Pomoglorbo, a TUI Pomodoro timer for your terminal

    2 projects | news.ycombinator.com | 19 Jun 2024
  • Elvish, expressive programming language and a versatile interactive shell

    9 projects | news.ycombinator.com | 9 May 2024
  • Xonsh: Python-powered, cross-platform, Unix-gazing shell

    12 projects | news.ycombinator.com | 14 Feb 2024
  • Nb – note taking and archiving on the command line

    1 project | news.ycombinator.com | 3 Feb 2024
  • Nb: CLI+web note/todo/bookmark/kb app in a single portable script

    1 project | news.ycombinator.com | 30 Jan 2024

Did you know that Shell is
the 11th most popular programming language
based on number of references?