{"action":"created","issue":{"url":"https://api.github.com/repos/elderamevans/familysearch-gramps/issues/3","labels_url":"https://api.github.com/repos/elderamevans/familysearch-gramps/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/elderamevans/familysearch-gramps/issues/3/comments","events_url":"https://api.github.com/repos/elderamevans/familysearch-gramps/issues/3/events","html_url":"https://github.com/elderamevans/familysearch-gramps/issues/3","id":86582712,"number":3,"title":"To and From Gramps","user":{"login":"dsblank","id":168568,"avatar_url":"https://avatars.githubusercontent.com/u/168568?v=3","gravatar_id":"","url":"https://api.github.com/users/dsblank","html_url":"https://github.com/dsblank","followers_url":"https://api.github.com/users/dsblank/followers","following_url":"https://api.github.com/users/dsblank/following{/other_user}","gists_url":"https://api.github.com/users/dsblank/gists{/gist_id}","starred_url":"https://api.github.com/users/dsblank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsblank/subscriptions","organizations_url":"https://api.github.com/users/dsblank/orgs","repos_url":"https://api.github.com/users/dsblank/repos","events_url":"https://api.github.com/users/dsblank/events{/privacy}","received_events_url":"https://api.github.com/users/dsblank/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-06-09T12:32:09Z","updated_at":"2015-06-10T14:07:05Z","closed_at":null,"body":"It seems like the next step for integrating Gramps with FS is to write functions to go back and forth between Gramps and FS. Gramps has two serialized forms:\r\n\r\n1. a Python tuple-based raw form, eg, `person.serialize()`. This is the internal format stored in the database.\r\n2. a JSON-like dictionary-based form, eg, `person.to_struct()`. This is used for queries and diffs, etc.\r\n\r\nThe second form may be easier to deal with, especially as time goes on, because it can be immune to some variance in the data format.\r\n\r\nLikewise, you can create an object from either form. In the serialized case, you need to construct the all parts exactly (`Person.create(data)` where data is a tuple-based form). I believe that the JSON-like format will fill in default values (`Person.create(Person.from_struct(data))` where data is a JSON-like struct). \r\n\r\nSo, I suggest methods that can take a FS result and convert it to a Gramps struct, and a Gramps struct and convert to FS JSON."},"comment":{"url":"https://api.github.com/repos/elderamevans/familysearch-gramps/issues/comments/110767339","html_url":"https://github.com/elderamevans/familysearch-gramps/issues/3#issuecomment-110767339","issue_url":"https://api.github.com/repos/elderamevans/familysearch-gramps/issues/3","id":110767339,"user":{"login":"elderamevans","id":8450866,"avatar_url":"https://avatars.githubusercontent.com/u/8450866?v=3","gravatar_id":"","url":"https://api.github.com/users/elderamevans","html_url":"https://github.com/elderamevans","followers_url":"https://api.github.com/users/elderamevans/followers","following_url":"https://api.github.com/users/elderamevans/following{/other_user}","gists_url":"https://api.github.com/users/elderamevans/gists{/gist_id}","starred_url":"https://api.github.com/users/elderamevans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elderamevans/subscriptions","organizations_url":"https://api.github.com/users/elderamevans/orgs","repos_url":"https://api.github.com/users/elderamevans/repos","events_url":"https://api.github.com/users/elderamevans/events{/privacy}","received_events_url":"https://api.github.com/users/elderamevans/received_events","type":"User","site_admin":false},"created_at":"2015-06-10T14:07:05Z","updated_at":"2015-06-10T14:07:05Z","body":"Good point! I'll see what I can't do!"}}