Closed hyuki closed 1 year ago
It looks that bsky thread --json
still produces invalid JSON as follows.
$ brew install jsonlint
$ git log --oneline | head -3
cdff7fd thread's JSON should be FeedDefs_ThreadViewPost.Post
50a4a68 bump up version to 0.0.31
f646d1b add -pattern and -reply
$ make all
$ ./bsky thread --json at://did:plc:k762js3b44u4kppedx63ozsw/app.bsky.feed.post/3ju6nl3mnvx22 | jq | jsonlint -c
line 142, col 1, found: '{' - expected: 'EOF', '}', ',', ']'.
$ ./bsky thread --json at://did:plc:k762js3b44u4kppedx63ozsw/app.bsky.feed.post/3ju6nl3mnvx22 | jsonlint -c
line 1, col 4034, found: '{' - expected: 'EOF', '}', ',', ']'.
I heard that bsky
produces ndjson. The separator is "\n"
.
So current behaviour is valid as ndjson.
Each line is valid JSON as follows:
$ ./bsky thread --json at://did:plc:k762js3b44u4kppedx63ozsw/app.bsky.feed.post/3ju6nl3mnvx22 | head -1 | jsonlint -c
(No error, displays pretty-printed JSON (for first line of result)
bsky thread --json at://did:...
returns invalid JSON.Example session is as follows (full session is on gist):
As you can see,
bsky thread --json at://did:...
returns{ ... }{ ... }
. It is invalid JSON.