{"action":"created","issue":{"url":"https://api.github.com/repos/cazala/synaptic/issues/24","labels_url":"https://api.github.com/repos/cazala/synaptic/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/cazala/synaptic/issues/24/comments","events_url":"https://api.github.com/repos/cazala/synaptic/issues/24/events","html_url":"https://github.com/cazala/synaptic/issues/24","id":65284650,"number":24,"title":"Saving network to file","user":{"login":"Leekao","id":8443824,"avatar_url":"https://avatars.githubusercontent.com/u/8443824?v=3","gravatar_id":"","url":"https://api.github.com/users/Leekao","html_url":"https://github.com/Leekao","followers_url":"https://api.github.com/users/Leekao/followers","following_url":"https://api.github.com/users/Leekao/following{/other_user}","gists_url":"https://api.github.com/users/Leekao/gists{/gist_id}","starred_url":"https://api.github.com/users/Leekao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Leekao/subscriptions","organizations_url":"https://api.github.com/users/Leekao/orgs","repos_url":"https://api.github.com/users/Leekao/repos","events_url":"https://api.github.com/users/Leekao/events{/privacy}","received_events_url":"https://api.github.com/users/Leekao/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-03-30T19:35:18Z","updated_at":"2015-04-01T13:36:20Z","closed_at":null,"body":"I exported my network to json using .toJSON() and saved it to file after using \"JSON.stringify\" on it, when I read it I used \"JSON.parse\" to convert into json and loaded it using \"Network.fromJSON\" and I got this error: \"Connection Error: Invalid neurons\".\r\n\r\nhas anyone else encountered this?"},"comment":{"url":"https://api.github.com/repos/cazala/synaptic/issues/comments/88483119","html_url":"https://github.com/cazala/synaptic/issues/24#issuecomment-88483119","issue_url":"https://api.github.com/repos/cazala/synaptic/issues/24","id":88483119,"user":{"login":"cazala","id":2781777,"avatar_url":"https://avatars.githubusercontent.com/u/2781777?v=3","gravatar_id":"","url":"https://api.github.com/users/cazala","html_url":"https://github.com/cazala","followers_url":"https://api.github.com/users/cazala/followers","following_url":"https://api.github.com/users/cazala/following{/other_user}","gists_url":"https://api.github.com/users/cazala/gists{/gist_id}","starred_url":"https://api.github.com/users/cazala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cazala/subscriptions","organizations_url":"https://api.github.com/users/cazala/orgs","repos_url":"https://api.github.com/users/cazala/repos","events_url":"https://api.github.com/users/cazala/events{/privacy}","received_events_url":"https://api.github.com/users/cazala/received_events","type":"User","site_admin":false},"created_at":"2015-04-01T13:36:20Z","updated_at":"2015-04-01T13:36:20Z","body":"Well, the error that you are getting ('Invalid neurons') comes from the `Connection` object, because one or both of the two neurons that you are trying to connect is not a `Neuron`, ie: \r\n\r\n```\r\nvar A = new Neuron();\r\nA.project(null) // throws 'Invalid neurons'\r\n```\r\n\r\nAnd in that json that you pasted I can see many connections that say `\"to\":null`, that's what's causing the error. Does the json look like that just after you call `toJSON()` or is it after you store it and fetch it back from Mongo? Also, could you share the architecture you are using? Maybe that will shed some light on the issue."}}