{"action":"created","issue":{"url":"https://api.github.com/repos/adamyeager/PushbulletSharp/issues/22","repository_url":"https://api.github.com/repos/adamyeager/PushbulletSharp","labels_url":"https://api.github.com/repos/adamyeager/PushbulletSharp/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/adamyeager/PushbulletSharp/issues/22/comments","events_url":"https://api.github.com/repos/adamyeager/PushbulletSharp/issues/22/events","html_url":"https://github.com/adamyeager/PushbulletSharp/issues/22","id":191781332,"number":22,"title":"Issue sending unecrypted Ephemeral Notification Request","user":{"login":"khm971","id":6992942,"avatar_url":"https://avatars.githubusercontent.com/u/6992942?v=3","gravatar_id":"","url":"https://api.github.com/users/khm971","html_url":"https://github.com/khm971","followers_url":"https://api.github.com/users/khm971/followers","following_url":"https://api.github.com/users/khm971/following{/other_user}","gists_url":"https://api.github.com/users/khm971/gists{/gist_id}","starred_url":"https://api.github.com/users/khm971/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/khm971/subscriptions","organizations_url":"https://api.github.com/users/khm971/orgs","repos_url":"https://api.github.com/users/khm971/repos","events_url":"https://api.github.com/users/khm971/events{/privacy}","received_events_url":"https://api.github.com/users/khm971/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-26T02:00:37Z","updated_at":"2016-11-26T16:41:29Z","closed_at":null,"body":"Hi, Adam, and thank you for the excellent wrapper!\r\n\r\nI wanted to share what I think is a bug in the new Ephemeral Push code.  The below statement works great:\r\nDim Result As String = client.PushEphemeral(NotificationRequest, True)\r\n\r\nHowever, this:\r\nDim Result As String = client.PushEphemeral(NotificationRequest, False)\r\nresults in the following error:\r\n\r\nType 'PushbulletSharp.Models.Requests.Ephemerals.NotificationEphemeral' with data contract name 'NotificationEphemeral:http://schemas.datacontract.org/2004/07/PushbulletSharp.Models.Requests.Ephemerals' is not expected. Consider using a DataContractResolver if you are using DataContractSerializer or add any types not known statically to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to the serializer.\r\n\r\nAnd I believe it's happening here:\r\n\r\n public static class PushbulletSharpExtensions\r\n    {\r\n        /// <summary>\r\n        /// To the json.\r\n        /// </summary>\r\n        /// <param name=\"data\">The data.</param>\r\n        /// <returns></returns>\r\n        public static string ToJson(this object data)\r\n        {\r\n            var serializer = new DataContractJsonSerializer(data.GetType());\r\n\r\n            using (MemoryStream stream = new MemoryStream())\r\n            {\r\n                serializer.WriteObject(stream, data);   // **** OFFENDING CODE ******\r\n                return Encoding.UTF8.GetString(stream.ToArray(), 0, (int)stream.Length);\r\n            }\r\n        }\r\n\r\nHopefully that's useful information.  If you'd like any more info, just let me know, and thanks for all of your work!\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/adamyeager/PushbulletSharp/issues/comments/263073027","html_url":"https://github.com/adamyeager/PushbulletSharp/issues/22#issuecomment-263073027","issue_url":"https://api.github.com/repos/adamyeager/PushbulletSharp/issues/22","id":263073027,"user":{"login":"khm971","id":6992942,"avatar_url":"https://avatars.githubusercontent.com/u/6992942?v=3","gravatar_id":"","url":"https://api.github.com/users/khm971","html_url":"https://github.com/khm971","followers_url":"https://api.github.com/users/khm971/followers","following_url":"https://api.github.com/users/khm971/following{/other_user}","gists_url":"https://api.github.com/users/khm971/gists{/gist_id}","starred_url":"https://api.github.com/users/khm971/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/khm971/subscriptions","organizations_url":"https://api.github.com/users/khm971/orgs","repos_url":"https://api.github.com/users/khm971/repos","events_url":"https://api.github.com/users/khm971/events{/privacy}","received_events_url":"https://api.github.com/users/khm971/received_events","type":"User","site_admin":false},"created_at":"2016-11-26T16:41:28Z","updated_at":"2016-11-26T16:41:28Z","body":"Hi, Adam,\r\n\r\nThanks for the quick reply.  Yes, I sure do enjoy your library, made my life so much easier and my code so much cleaner than the mess I was making on my own.\r\n\r\nEnjoy your time with the family!\r\n\r\n/\\KHM\r\n\r\n\r\nFrom: Adam Yeager [mailto:notifications@github.com]\r\nSent: Saturday, November 26, 2016 8:17 AM\r\nTo: adamyeager/PushbulletSharp <PushbulletSharp@noreply.github.com>\r\nCc: Kevin McMahon <khm@InnovativeSol.com>; Author <author@noreply.github.com>\r\nSubject: Re: [adamyeager/PushbulletSharp] Issue sending unecrypted Ephemeral Notification Request (#22)\r\n\r\n\r\nGood catch, and sorry that it's happening. I've got family in town today, and I should be free to look into the issue tomorrow. Hopefully I'll have it resolved for you in the next couple of days.\r\n\r\nI'm glad to hear you're enjoying this library! :)\r\n\r\n—\r\nYou are receiving this because you authored the thread.\r\nReply to this email directly, view it on GitHub<https://github.com/adamyeager/PushbulletSharp/issues/22#issuecomment-263063006>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AGq0Lp-k7XT3mf4e_rMI24eJbNo49R-fks5rCDFVgaJpZM4K8yFP>.\r\n"}}
{"actor":{"display_login":"khm971"}}