Skip to content

fix: correct JSON field serialization for PostgreSQL vs SQLite#2798

Merged
os-zhuang merged 1 commit into
objectstack-ai:mainfrom
akarma-synetal:bugfix/sql-driver-json-serialization
Jul 11, 2026
Merged

fix: correct JSON field serialization for PostgreSQL vs SQLite#2798
os-zhuang merged 1 commit into
objectstack-ai:mainfrom
akarma-synetal:bugfix/sql-driver-json-serialization

Conversation

@akarma-synetal

Copy link
Copy Markdown
Contributor

Summary

  • PostgreSQL native jsonb columns now correctly receive JSON.stringify for all values (strings, numbers, booleans, objects)
  • SQLite path unchanged: only objects/arrays are stringified (SQLite TEXT storage)
  • Previously the SQLite-only path was incorrectly applied to PostgreSQL, causing primitives in jsonb columns to be silently rejected

Test plan

  • Verify jsonb column writes with string/number/boolean values work on PostgreSQL
  • Verify existing SQLite JSON field behavior is unchanged

Made with Cursor

PostgreSQL native jsonb columns require all values to be valid JSON,
while SQLite stores JSON as TEXT so only objects/arrays need
stringification. Previously the SQLite-only path incorrectly applied
to PG, and primitives in PG jsonb columns were silently rejected.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Jul 10, 2026

Copy link
Copy Markdown

@akarma-synetal is attempting to deploy a commit to the Object Stack Team on Vercel.

A member of the Team first needs to authorize it.

@os-zhuang
os-zhuang merged commit d48b1fd into objectstack-ai:main Jul 11, 2026
13 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants