Automatically stringifying object when inserting to a MySQL JSON column with knex
问题 Let's jump straight to an example code: create table test_json_table ( data json not null ); I can insert to the table like this: const columns = { data: "{ some_json: 123 }" }; // notice that the data column is passed as string await knex('test_json_table').insert(columns); And get data from the table like this: await knex('test_json_table').select(); // returns: // [ // { data: { some_json: 123 } } // notice that the data is returned as parsed JavaScript object (not a string) // ] When