Good day. Can not link python, json and mssql.
There is a test json. I am trying to load it into the database in one cell. After that, unload it back and work with it. All this is needed to understand how it works. But there were problems .. Download, like? it turns out fine, but to unload and work with it is not. To load the base cell I use this:
parsed_string = json.loads(json_string) cursor.execute("update Table set Status = ? where Name like ? ",(json.dumps(parsed_string), "Blabla")) cnxn.commit() To unload from the cell
cursor.execute("""select Status from Table where Name like ?""", "Blabla") cursor.fetchall() Here are the requests for loading and unloading ... How to continue to work with what happened? Python output, after unloading from the cell. I do not understand what is wrong with the format, because everything is stored in base normally.
"{\"orderID\": 42, \"orderContents\": [{\"productName\": \"keyboard\", \"quantity\": 1, \"productID\": 23}, {\"productName\": \"mouse\", \"quantity\": 1, \"productID\": 13}], \