Has anyone tried creating a new MySQL table using JSON format? I have a test JSON file and I want to convert it into a new database table.
[
{
"name": "work_schedules",
"columns": {
"test": "SMALLINT",
"test2": "STRING"
}
}
]
Below is the code snippet where I am trying to create the table. Can we define columns using JSON?
con.query("CREATE TABLE " + element.name + " /*What should go here?*/")
Any suggestions or advice are greatly appreciated!