I want to save my grids as a json to a json column in a database and also retrieve these grids from the database and convert them back to a Grid instance. However the serialize method for a Grid currently serialized to a file and the deserialize method also takes a file path as input.
for saving
I would like to avoid the intermediate step of writing the grid to a file and then reading the file to a string that I can add to my insert query. Instead I would like a method to serialize the grid to a python dict that I can then directly use in my database API.
for retrieving
I would like to avoid the intermediate step of writing the json from my database to a file, before I can deserialize to a grid instance. I would like to be able to use a method that deserializes a pyhton dict to a Grid instance.
I want to save my grids as a json to a json column in a database and also retrieve these grids from the database and convert them back to a Grid instance. However the serialize method for a Grid currently serialized to a file and the deserialize method also takes a file path as input.
for saving
I would like to avoid the intermediate step of writing the grid to a file and then reading the file to a string that I can add to my insert query. Instead I would like a method to serialize the grid to a python dict that I can then directly use in my database API.
for retrieving
I would like to avoid the intermediate step of writing the json from my database to a file, before I can deserialize to a grid instance. I would like to be able to use a method that deserializes a pyhton dict to a Grid instance.