HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
h4l
json.bash
Shell2024–2024
h4l / json.bash

json.bash

Command-line tool and bash library that creates JSON

2Distinct people
4Mentions
0Explicit recommenders
460GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Command-line tool and bash library that creates JSON

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 8–Nov 15 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/15/2026, 9:28:18 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by hour4 dated mentions

Observed mentions: 2024-07-03 10:18:00 UTC to 2024-07-03 17:39:25 UTC.

012024-07-03 10:00:00 UTC to 2024-07-03 11:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 commentsJul 3, 10:002024-07-03 11:00:00 UTC to 2024-07-03 12:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-07-03 12:00:00 UTC to 2024-07-03 13:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-07-03 13:00:00 UTC to 2024-07-03 14:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsJul 3, 13:002024-07-03 14:00:00 UTC to 2024-07-03 15:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2024-07-03 15:00:00 UTC to 2024-07-03 16:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-07-03 16:00:00 UTC to 2024-07-03 17:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2024-07-03 17:00:00 UTC to 2024-07-03 18:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsJul 3, 17:00

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Jul 3, 10:002024-07-03 10:00:00 UTC2024-07-03 11:00:00 UTC110
Jul 3, 11:002024-07-03 11:00:00 UTC2024-07-03 12:00:00 UTC000
Jul 3, 12:002024-07-03 12:00:00 UTC2024-07-03 13:00:00 UTC000
Jul 3, 13:002024-07-03 13:00:00 UTC2024-07-03 14:00:00 UTC000
Jul 3, 14:002024-07-03 14:00:00 UTC2024-07-03 15:00:00 UTC101
Jul 3, 15:002024-07-03 15:00:00 UTC2024-07-03 16:00:00 UTC000
Jul 3, 16:002024-07-03 16:00:00 UTC2024-07-03 17:00:00 UTC101
Jul 3, 17:002024-07-03 17:00:00 UTC2024-07-03 18:00:00 UTC101

What Hacker News says

1 sources
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 c
Read the rest
an 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
In Show HN: Jb / json.bash – Command-line tool (and bash library) that creates JSON

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.