{"action":"created","issue":{"url":"https://api.github.com/repos/ElementsProject/lightning/issues/1312","repository_url":"https://api.github.com/repos/ElementsProject/lightning","labels_url":"https://api.github.com/repos/ElementsProject/lightning/issues/1312/labels{/name}","comments_url":"https://api.github.com/repos/ElementsProject/lightning/issues/1312/comments","events_url":"https://api.github.com/repos/ElementsProject/lightning/issues/1312/events","html_url":"https://github.com/ElementsProject/lightning/issues/1312","id":310685305,"number":1312,"title":"Invoices with integer descriptions are rejected","user":{"login":"shesek","id":877904,"avatar_url":"https://avatars0.githubusercontent.com/u/877904?v=4","gravatar_id":"","url":"https://api.github.com/users/shesek","html_url":"https://github.com/shesek","followers_url":"https://api.github.com/users/shesek/followers","following_url":"https://api.github.com/users/shesek/following{/other_user}","gists_url":"https://api.github.com/users/shesek/gists{/gist_id}","starred_url":"https://api.github.com/users/shesek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shesek/subscriptions","organizations_url":"https://api.github.com/users/shesek/orgs","repos_url":"https://api.github.com/users/shesek/repos","events_url":"https://api.github.com/users/shesek/events{/privacy}","received_events_url":"https://api.github.com/users/shesek/received_events","type":"User","site_admin":false},"labels":[{"id":765490737,"url":"https://api.github.com/repos/ElementsProject/lightning/labels/json-rpc","name":"json-rpc","color":"c0d653","default":false},{"id":223861691,"url":"https://api.github.com/repos/ElementsProject/lightning/labels/wontfix","name":"wontfix","color":"ffffff","default":true}],"state":"closed","locked":false,"assignee":{"login":"rustyrussell","id":775844,"avatar_url":"https://avatars2.githubusercontent.com/u/775844?v=4","gravatar_id":"","url":"https://api.github.com/users/rustyrussell","html_url":"https://github.com/rustyrussell","followers_url":"https://api.github.com/users/rustyrussell/followers","following_url":"https://api.github.com/users/rustyrussell/following{/other_user}","gists_url":"https://api.github.com/users/rustyrussell/gists{/gist_id}","starred_url":"https://api.github.com/users/rustyrussell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rustyrussell/subscriptions","organizations_url":"https://api.github.com/users/rustyrussell/orgs","repos_url":"https://api.github.com/users/rustyrussell/repos","events_url":"https://api.github.com/users/rustyrussell/events{/privacy}","received_events_url":"https://api.github.com/users/rustyrussell/received_events","type":"User","site_admin":false},"assignees":[{"login":"rustyrussell","id":775844,"avatar_url":"https://avatars2.githubusercontent.com/u/775844?v=4","gravatar_id":"","url":"https://api.github.com/users/rustyrussell","html_url":"https://github.com/rustyrussell","followers_url":"https://api.github.com/users/rustyrussell/followers","following_url":"https://api.github.com/users/rustyrussell/following{/other_user}","gists_url":"https://api.github.com/users/rustyrussell/gists{/gist_id}","starred_url":"https://api.github.com/users/rustyrussell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rustyrussell/subscriptions","organizations_url":"https://api.github.com/users/rustyrussell/orgs","repos_url":"https://api.github.com/users/rustyrussell/repos","events_url":"https://api.github.com/users/rustyrussell/events{/privacy}","received_events_url":"https://api.github.com/users/rustyrussell/received_events","type":"User","site_admin":false}],"milestone":null,"comments":11,"created_at":"2018-04-03T03:53:04Z","updated_at":"2018-04-03T13:18:29Z","closed_at":"2018-04-03T10:34:54Z","author_association":"NONE","body":"Similarly to #1291, descriptions that are JSON encoded as numbers are rejected with the error message `description '...' not a string`. If the number is encoded as a quoted string, the invoice is accepted.\r\n\r\nThere are two possible related fixes here:\r\n\r\n1. Change `lightning-cli invoice` to always escape the description as a string. Other client libraries/utilities will have to make sure to do that as well.\r\n\r\n2. Always cast the description to a string when processing it.\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ElementsProject/lightning/issues/comments/378246735","html_url":"https://github.com/ElementsProject/lightning/issues/1312#issuecomment-378246735","issue_url":"https://api.github.com/repos/ElementsProject/lightning/issues/1312","id":378246735,"user":{"login":"ZmnSCPxj","id":28175207,"avatar_url":"https://avatars0.githubusercontent.com/u/28175207?v=4","gravatar_id":"","url":"https://api.github.com/users/ZmnSCPxj","html_url":"https://github.com/ZmnSCPxj","followers_url":"https://api.github.com/users/ZmnSCPxj/followers","following_url":"https://api.github.com/users/ZmnSCPxj/following{/other_user}","gists_url":"https://api.github.com/users/ZmnSCPxj/gists{/gist_id}","starred_url":"https://api.github.com/users/ZmnSCPxj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZmnSCPxj/subscriptions","organizations_url":"https://api.github.com/users/ZmnSCPxj/orgs","repos_url":"https://api.github.com/users/ZmnSCPxj/repos","events_url":"https://api.github.com/users/ZmnSCPxj/events{/privacy}","received_events_url":"https://api.github.com/users/ZmnSCPxj/received_events","type":"User","site_admin":false},"created_at":"2018-04-03T13:18:29Z","updated_at":"2018-04-03T13:18:29Z","author_association":"COLLABORATOR","body":"@shesek, here is the rule: https://github.com/ElementsProject/lightning/blob/693d6fddab548a29ecf6968002a0af8fd63890d2/cli/lightning-cli.c#L143-L153\r\n\r\nIf this returns true it will be passed directly as a JSON object."}}
{"actor":{"display_login":"ZmnSCPxj"}}