{"action":"created","issue":{"url":"https://api.github.com/repos/shell-software/tree/issues/2","repository_url":"https://api.github.com/repos/shell-software/tree","labels_url":"https://api.github.com/repos/shell-software/tree/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/shell-software/tree/issues/2/comments","events_url":"https://api.github.com/repos/shell-software/tree/issues/2/events","html_url":"https://github.com/shell-software/tree/issues/2","id":167992105,"number":2,"title":"How to save in mongodb","user":{"login":"keryhu","id":16506632,"avatar_url":"https://avatars.githubusercontent.com/u/16506632?v=3","gravatar_id":"","url":"https://api.github.com/users/keryhu","html_url":"https://github.com/keryhu","followers_url":"https://api.github.com/users/keryhu/followers","following_url":"https://api.github.com/users/keryhu/following{/other_user}","gists_url":"https://api.github.com/users/keryhu/gists{/gist_id}","starred_url":"https://api.github.com/users/keryhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keryhu/subscriptions","organizations_url":"https://api.github.com/users/keryhu/orgs","repos_url":"https://api.github.com/users/keryhu/repos","events_url":"https://api.github.com/users/keryhu/events{/privacy}","received_events_url":"https://api.github.com/users/keryhu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-28T01:13:59Z","updated_at":"2016-07-28T06:04:00Z","closed_at":null,"body":"Hello,\r\n   tanks to your code . can i ask:\r\n\r\n   if i  implements like this --\r\n\r\n```\r\nTreeNode<String> n1 = new ArrayMultiTreeNode<>(\"n1\");\r\nTreeNode<String> n2 = new ArrayMultiTreeNode<>(\"n2\");\r\nTreeNode<String> n3 = new ArrayMultiTreeNode<>(\"n3\");\r\nTreeNode<String> n4 = new ArrayMultiTreeNode<>(\"n4\");\r\nTreeNode<String> n5 = new ArrayMultiTreeNode<>(\"n5\");\r\nTreeNode<String> n6 = new ArrayMultiTreeNode<>(\"n6\");\r\nTreeNode<String> n7 = new ArrayMultiTreeNode<>(\"n7\");\r\n\r\n// Assigning tree nodes\r\nn1.add(n2);\r\nn1.add(n3);\r\nn1.add(n4);\r\nn2.add(n5);\r\nn2.add(n6);\r\nn4.add(n7);\r\n```\r\n\r\n\r\nHow to save the above node tree in mongodb?"},"comment":{"url":"https://api.github.com/repos/shell-software/tree/issues/comments/235806732","html_url":"https://github.com/shell-software/tree/issues/2#issuecomment-235806732","issue_url":"https://api.github.com/repos/shell-software/tree/issues/2","id":235806732,"user":{"login":"shell-software","id":10495282,"avatar_url":"https://avatars.githubusercontent.com/u/10495282?v=3","gravatar_id":"","url":"https://api.github.com/users/shell-software","html_url":"https://github.com/shell-software","followers_url":"https://api.github.com/users/shell-software/followers","following_url":"https://api.github.com/users/shell-software/following{/other_user}","gists_url":"https://api.github.com/users/shell-software/gists{/gist_id}","starred_url":"https://api.github.com/users/shell-software/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shell-software/subscriptions","organizations_url":"https://api.github.com/users/shell-software/orgs","repos_url":"https://api.github.com/users/shell-software/repos","events_url":"https://api.github.com/users/shell-software/events{/privacy}","received_events_url":"https://api.github.com/users/shell-software/received_events","type":"User","site_admin":false},"created_at":"2016-07-28T06:04:00Z","updated_at":"2016-07-28T06:04:00Z","body":"Hi, **keryhu**\r\n\r\nThank you for your question\r\n\r\nIn general you need to follow these steps:\r\n\r\n1. Obey the Bson Document or JSON structure (key-value pairs). The example tree listed above doesn't obey this rule.\r\n2. Create a class, which will perform the conversion from the tree node to Bson Document / JSON structure. *Java Tree Library* doesn't have this built-in feature, because this is not its responsibility and you have to implement it on your own\r\n3. Use any mongodb driver for performing *insert* operation. I suggest you to use the [Official MongoDB driver for Java](https://docs.mongodb.com/ecosystem/drivers/java/)\r\n\r\n"}}
{"actor":{"display_login":"shell-software"}}