You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a field (tags) that is of type JSON. I insert a record with the json value stringified. That appears to succeed. However, when I read the record back out, the value is missing inner quotes around values that need them.
The actual result is unusable.
Steps to Reproduce
awaitdb.run(`CREATE TABLE IF NOT EXISTS foo ( _id CHAR(6) NOT NULL PRIMARY KEY, tags JSON DEFAULT []);`);const_id=uid(6);consttags=["groceries"];awaitdb.run(`INSERT INTO foo (_id,tags) VALUES (${uid},${JSON.stringify(tags)});`);constrecord=awaitdb.run(`SELECT * FROM foo WHERE _id = ${uid};`);console.log(record);
Actual result:
{_id: 'a96ce3',tags: '[groceries]',}
Expected result:
{_id: 'a96ce3',tags: '["groceries"]',}
OR
{_id: 'a96ce3',tags: ["groceries"],}
Version
5.1.7
Node.js Version
21.5.0
How did you install the library?
npm i -S sqlite3
The text was updated successfully, but these errors were encountered:
Issue Summary
I have a field (
tags
) that is of typeJSON
. I insert a record with the json value stringified. That appears to succeed. However, when I read the record back out, the value is missing inner quotes around values that need them.The actual result is unusable.
Steps to Reproduce
Actual result:
Expected result:
OR
Version
5.1.7
Node.js Version
21.5.0
How did you install the library?
npm i -S sqlite3
The text was updated successfully, but these errors were encountered: