Skip to content

feat(checkers): add json_over_jsonb#17

Merged
pirr merged 1 commit into
mainfrom
feat/checker-json-over-jsonb
Apr 30, 2026
Merged

feat(checkers): add json_over_jsonb#17
pirr merged 1 commit into
mainfrom
feat/checker-json-over-jsonb

Conversation

@pirr

@pirr pirr commented Apr 30, 2026

Copy link
Copy Markdown
Owner

Flags columns typed as 'json' instead of 'jsonb'. The 'json' type stores the literal text and reparses on every read; 'jsonb' parses once at write, normalizes the structure, and supports GIN indexing plus the containment / existence operators (@>, ?, ?&, ?|). The only thing 'json' preserves that 'jsonb' doesn't is the input bytes — almost no application needs that, and the few that do (signature verification) usually want plain text storage instead.

Severity: warning. The cost (no indexing, slower reads) is real and accumulates as the table grows, but the schema isn't currently broken.

Tests: clean (jsonb), positive (json), mixed-type (only the json column flagged), dropped column ignored. 16/16 against PG 10/13/15/17.

@pirr pirr self-assigned this Apr 30, 2026
@pirr pirr added the checkers label Apr 30, 2026
Flags columns typed as 'json' instead of 'jsonb'. The 'json' type stores
the literal text and reparses on every read; 'jsonb' parses once at
write, normalizes the structure, and supports GIN indexing plus the
containment / existence operators (@>, ?, ?&, ?|). The only thing 'json'
preserves that 'jsonb' doesn't is the input bytes — almost no
application needs that, and the few that do (signature verification)
usually want plain text storage instead.

Severity: warning. The cost (no indexing, slower reads) is real and
accumulates as the table grows, but the schema isn't currently broken.

Tests: clean (jsonb), positive (json), mixed-type (only the json
column flagged), dropped column ignored. 16/16 against PG 10/13/15/17.
@pirr pirr force-pushed the feat/checker-json-over-jsonb branch from fcce0b9 to 5bffa63 Compare April 30, 2026 18:07
@pirr pirr merged commit 65fb3cf into main Apr 30, 2026
2 checks passed
@pirr pirr deleted the feat/checker-json-over-jsonb branch April 30, 2026 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant