I have a JSON
{
"data": {
"message": { “success” }
"user": {
"id": "1234",
"playlist": [
[
"title",
"album",
"artist",
"info"
],
[
"title",
"album",
"artist",
"info"
]
]
}
}
}
I want to fill MYSQL tables using the same. However i am a novice at python thus not sure how to do the same. How should i make sure that MYSQL tables are auto-updated when the JSON hits the server.
what i have tried is
db.execute("INSERT INTO json_col VALUES %s", title,album,artist,info)
ModelViewSetto create an interface for this purpose. The benefit will be limited as you only store JSON in a column, without any intelligence. Other databases with JSON support may be more suitable.