It would be useful if all objects from mgp are JSON serializable, that is, that there is some kind of method that returns Python Dict of mgp objects. For example, when I'm writing a query module for database export, I'm actually creating a JSON file with a list of nodes and relationships. Therefore, I have to reach every label, property, etc. of each Vertex and Edge. I would like to be able to just add properties as a list to my properties key, but then mgp.Vertex.properties is not JSON serializable. I solved this by going through all properties and creating new dictionary, but I think that the right place for this code would be inside mgp and not query module. Since we're going to create new utility modules similar to the export one, this feature may come in handy.
It would be useful if all objects from
mgpareJSONserializable, that is, that there is some kind of method that returns PythonDictofmgpobjects. For example, when I'm writing a query module for database export, I'm actually creating aJSONfile with a list of nodes and relationships. Therefore, I have to reach every label, property, etc. of eachVertexandEdge. I would like to be able to just add properties as a list to my properties key, but thenmgp.Vertex.propertiesis notJSONserializable. I solved this by going through all properties and creating new dictionary, but I think that the right place for this code would be inside mgp and not query module. Since we're going to create new utility modules similar to the export one, this feature may come in handy.