© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•16mo ago•
5 replies
opaldraggy

Json column type returning as plain string?

I have a schema for a json column (sqlite, proxy http driver) defined as:
 authors: text({ mode: 'json' }).notNull().$type<string[]>(),
 authors: text({ mode: 'json' }).notNull().$type<string[]>(),
; and I'm able to save data into it by passing an array of strings:
['Mary Shelley']
['Mary Shelley']
. However, when I run a select on that schema, I get back a string of the json:
"[\"Mary Shelley\"]"
"[\"Mary Shelley\"]"
. Curious if that's expected, and/or if there is a way to automatically parse the resulting json.

The type information for
authors
authors
is showing up correctly as
string[]
string[]
. But the data is a plain string.
Drizzle TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

json column returning as string
Drizzle TeamDTDrizzle Team / help
6mo ago
Json as a string
Drizzle TeamDTDrizzle Team / help
8mo ago
jsdoc for json type column
Drizzle TeamDTDrizzle Team / help
2y ago
Custom Type interpreted as String
Drizzle TeamDTDrizzle Team / help
3y ago