Search code examples
memgraphdb

Is it possible to parse JSON and convert it to the GQLAchemy model object?


I've installed GQLAchemy using pip install gqlalchemy. Now I want to convert a dictionary object into the appropriate GraphObject. Is it possible to parse JSON and convert it to the GQLAchemy model object?


Solution

  • Yes, each GraphObject, base class for e.g. Path has parse_obj method that takes JSON is a specific format and returns and instance of that object.