Error with content() for JSON response #330
Closed
Comments
I am still receiving this error. Actually I am using another package that internally uses httr. Any workarounds? When can the solution be expected? |
+1. hitted the same issue. |
+1 |
1 similar comment
+1 |
This needs to be fixed, but generally it is safer to extract the text and pass it to the parser yourself: req <- httr::GET("https://status.github.com/api/status.json")
text <- httr::content(req, "text", encoding="UTF-8")
data <- jsonlite::fromJSON(text) |
+1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am getting an error with latest httr version when calling
content
on a JSON response. Here's a small reproduction:The error will actually go away if I don't use
simplifyVector
argument. But I think the real issue is lies in this change: f0fc278#diff-de09a71ef56d7758b0d08b98fe0520eaL68The
encoding
argument was removed from function signature and now gets passed tojsonlite::fromJSON
. If I putencoding = NULL
back in that signature, ie removing it from...
, I no longer get the errorThe text was updated successfully, but these errors were encountered: