I have a JSON object in Python. I am Using Python DB-API and SimpleJson. I am trying to insert the json into a MySQL table.
At moment am getting errors and I believ
The most straightforward way to insert a python map into a MySQL JSON field...
python_map = { "foo": "bar", [ "baz", "biz" ] } sql = "INSERT INTO your_table (json_column_name) VALUES (%s)" cursor.execute( sql, (json.dumps(python_map),) )