-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create Tree object from Json #186
Comments
I had to parse the JSON dictionary/list structure to reconstruct the Tree object:
|
I found a much better solution that works amazingly well. Treelib trees and nodes are fully serializable, which allows the Pickle module to save the tree as a binary file. Doing this is surprisingly fast, even when working with trees that are megabytes in size.
|
Is there another (simple) way to load a tree from json without saving it ? |
Not sure if this is already possible, but I at least didn't see anything in the documentation.
Something like...
json_tree = #Json object here
t = Tree(json_tree)
The text was updated successfully, but these errors were encountered: