{"action":"created","issue":{"url":"https://api.github.com/repos/alickbass/CodableFirebase/issues/50","repository_url":"https://api.github.com/repos/alickbass/CodableFirebase","labels_url":"https://api.github.com/repos/alickbass/CodableFirebase/issues/50/labels{/name}","comments_url":"https://api.github.com/repos/alickbass/CodableFirebase/issues/50/comments","events_url":"https://api.github.com/repos/alickbass/CodableFirebase/issues/50/events","html_url":"https://github.com/alickbass/CodableFirebase/issues/50","id":350317921,"node_id":"MDU6SXNzdWUzNTAzMTc5MjE=","number":50,"title":"Decoding Timestamp and Geopoint from Firestore","user":{"login":"flashadvanced","id":6418134,"node_id":"MDQ6VXNlcjY0MTgxMzQ=","avatar_url":"https://avatars2.githubusercontent.com/u/6418134?v=4","gravatar_id":"","url":"https://api.github.com/users/flashadvanced","html_url":"https://github.com/flashadvanced","followers_url":"https://api.github.com/users/flashadvanced/followers","following_url":"https://api.github.com/users/flashadvanced/following{/other_user}","gists_url":"https://api.github.com/users/flashadvanced/gists{/gist_id}","starred_url":"https://api.github.com/users/flashadvanced/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flashadvanced/subscriptions","organizations_url":"https://api.github.com/users/flashadvanced/orgs","repos_url":"https://api.github.com/users/flashadvanced/repos","events_url":"https://api.github.com/users/flashadvanced/events{/privacy}","received_events_url":"https://api.github.com/users/flashadvanced/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-08-14T07:52:18Z","updated_at":"2018-09-05T19:59:51Z","closed_at":null,"author_association":"NONE","body":"Hey lads,\r\nIn my Firestore data I keep timestamp and geopoint fields. In my Swift model I keep them like this:\r\n```\r\nstruct MyFirestoreModel: Codable {\r\n    let dateAdded: Timestamp\r\n    let location: GeoPoint\r\n}\r\n```\r\nWhen I use FirebaseDecoder though I get these errors:\r\n\r\n**Timestamp**\r\n> typeMismatch(Swift.Double, Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: \"dateAdded\", intValue: nil)], debugDescription: \"Expected to decode Double but found FIRTimestamp instead.\", underlyingError: nil))\r\n\r\n**Geopoint**\r\n> typeMismatch(Swift.Dictionary<Swift.String, Any>, Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: \"location\", intValue: nil)], debugDescription: \"Not a dictionary\", underlyingError: nil))\r\n\r\nAny ideas what I am doing wrong? Cheers"},"comment":{"url":"https://api.github.com/repos/alickbass/CodableFirebase/issues/comments/418861935","html_url":"https://github.com/alickbass/CodableFirebase/issues/50#issuecomment-418861935","issue_url":"https://api.github.com/repos/alickbass/CodableFirebase/issues/50","id":418861935,"node_id":"MDEyOklzc3VlQ29tbWVudDQxODg2MTkzNQ==","user":{"login":"serjooo","id":7988482,"node_id":"MDQ6VXNlcjc5ODg0ODI=","avatar_url":"https://avatars1.githubusercontent.com/u/7988482?v=4","gravatar_id":"","url":"https://api.github.com/users/serjooo","html_url":"https://github.com/serjooo","followers_url":"https://api.github.com/users/serjooo/followers","following_url":"https://api.github.com/users/serjooo/following{/other_user}","gists_url":"https://api.github.com/users/serjooo/gists{/gist_id}","starred_url":"https://api.github.com/users/serjooo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/serjooo/subscriptions","organizations_url":"https://api.github.com/users/serjooo/orgs","repos_url":"https://api.github.com/users/serjooo/repos","events_url":"https://api.github.com/users/serjooo/events{/privacy}","received_events_url":"https://api.github.com/users/serjooo/received_events","type":"User","site_admin":false},"created_at":"2018-09-05T19:59:51Z","updated_at":"2018-09-05T19:59:51Z","author_association":"NONE","body":"Can you show me the code where you are encoding the `MyFirestoreModel` and saving it to Firestore"}}
{"actor":{"display_login":"serjooo"}}