{"action":"opened","issue":{"url":"https://api.github.com/repos/rstudio/leaflet/issues/299","repository_url":"https://api.github.com/repos/rstudio/leaflet","labels_url":"https://api.github.com/repos/rstudio/leaflet/issues/299/labels{/name}","comments_url":"https://api.github.com/repos/rstudio/leaflet/issues/299/comments","events_url":"https://api.github.com/repos/rstudio/leaflet/issues/299/events","html_url":"https://github.com/rstudio/leaflet/issues/299","id":179061425,"number":299,"title":"label and popup fail with named vectors","user":{"login":"kent37","id":187033,"avatar_url":"https://avatars.githubusercontent.com/u/187033?v=3","gravatar_id":"","url":"https://api.github.com/users/kent37","html_url":"https://github.com/kent37","followers_url":"https://api.github.com/users/kent37/followers","following_url":"https://api.github.com/users/kent37/following{/other_user}","gists_url":"https://api.github.com/users/kent37/gists{/gist_id}","starred_url":"https://api.github.com/users/kent37/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kent37/subscriptions","organizations_url":"https://api.github.com/users/kent37/orgs","repos_url":"https://api.github.com/users/kent37/repos","events_url":"https://api.github.com/users/kent37/events{/privacy}","received_events_url":"https://api.github.com/users/kent37/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-25T01:11:02Z","updated_at":"2016-09-25T01:11:02Z","closed_at":null,"body":"If the label and popup parameters to addXxx methods are named vectors, they don't work. For example,\r\n```r\r\nlabel = c(label='This is a label')\r\nleaflet() %>% addTiles() %>%\r\n  addMarkers(\r\n    lng=-118.456554, lat=34.078039,\r\n    label=label)\r\n```\r\ngets the error\r\n`Input to asJSON(keep_vec_names=TRUE) is a named vector. In a future version of jsonlite, this option will not be supported, and named vectors will be translated into arrays instead of objects. If you want JSON object output, please use a named list instead. See ?toJSON.\r\n`\r\nand shows a dash instead of the label."}}
{"actor":{"display_login":"kent37"}}