{"action":"created","issue":{"url":"https://api.github.com/repos/jpmens/mqttwarn/issues/272","repository_url":"https://api.github.com/repos/jpmens/mqttwarn","labels_url":"https://api.github.com/repos/jpmens/mqttwarn/issues/272/labels{/name}","comments_url":"https://api.github.com/repos/jpmens/mqttwarn/issues/272/comments","events_url":"https://api.github.com/repos/jpmens/mqttwarn/issues/272/events","html_url":"https://github.com/jpmens/mqttwarn/issues/272","id":276850943,"number":272,"title":"Unable to decode json with null terminating char","user":{"login":"rweller59","id":23178282,"avatar_url":"https://avatars0.githubusercontent.com/u/23178282?v=4","gravatar_id":"","url":"https://api.github.com/users/rweller59","html_url":"https://github.com/rweller59","followers_url":"https://api.github.com/users/rweller59/followers","following_url":"https://api.github.com/users/rweller59/following{/other_user}","gists_url":"https://api.github.com/users/rweller59/gists{/gist_id}","starred_url":"https://api.github.com/users/rweller59/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rweller59/subscriptions","organizations_url":"https://api.github.com/users/rweller59/orgs","repos_url":"https://api.github.com/users/rweller59/repos","events_url":"https://api.github.com/users/rweller59/events{/privacy}","received_events_url":"https://api.github.com/users/rweller59/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-11-26T19:50:42Z","updated_at":"2017-11-28T00:10:54Z","closed_at":null,"author_association":"NONE","body":"I don't have control over the incoming json message. Messages received are null terminated. Is there any way to manage this? All messages received error with Cannot Decode JSON object, extra data at end of message"},"comment":{"url":"https://api.github.com/repos/jpmens/mqttwarn/issues/comments/347371020","html_url":"https://github.com/jpmens/mqttwarn/issues/272#issuecomment-347371020","issue_url":"https://api.github.com/repos/jpmens/mqttwarn/issues/272","id":347371020,"user":{"login":"rweller59","id":23178282,"avatar_url":"https://avatars0.githubusercontent.com/u/23178282?v=4","gravatar_id":"","url":"https://api.github.com/users/rweller59","html_url":"https://github.com/rweller59","followers_url":"https://api.github.com/users/rweller59/followers","following_url":"https://api.github.com/users/rweller59/following{/other_user}","gists_url":"https://api.github.com/users/rweller59/gists{/gist_id}","starred_url":"https://api.github.com/users/rweller59/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rweller59/subscriptions","organizations_url":"https://api.github.com/users/rweller59/orgs","repos_url":"https://api.github.com/users/rweller59/repos","events_url":"https://api.github.com/users/rweller59/events{/privacy}","received_events_url":"https://api.github.com/users/rweller59/received_events","type":"User","site_admin":false},"created_at":"2017-11-28T00:10:54Z","updated_at":"2017-11-28T00:10:54Z","author_association":"NONE","body":"thanks for providing the code - would have taken me awhile I imagine. The 'cannot decode' error is now gone but I've got another error that replaced it. Without the change, I got the 'cannot decode' error but the message was put into the 'full' column field without data being parsed into columns. With the line of code to strip, nothing is logged to sql and I get the following error...\r\n\r\nWARNING [mysql] Cannot add mysql row: (1064, 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \\'1, test, full) values (46.6, 70.5, \\'{\\\\\"test\\\\\":70.5,\\\\\"1\\\\\":46.6}\\')\\' at line 1')\r\n\r\nThe JSON received is {\"test\":70.5,\"1\":46.6}\r\n\r\nI'm using MySql with a single table that is pretty simple. Columns test, 1, full\r\nIf I should open a separate issue I will. Or if you can give me some hints on where to look for what's going on that would be great.\r\n\r\nEverything worked a couple of weeks ago with a different device sending the mqtt data"}}
{"actor":{"display_login":"rweller59"}}