cscheid / rgithub

R bindings for the github API
MIT License
70 stars 31 forks source link

ead1c0d broke the package because GitHub doesn't accept vectors instead of scalars #50

Closed s-u closed 9 years ago

s-u commented 9 years ago

By default jsonlite encodes scalars as vectors, so the resulting requests are invalid and thus GitHub rejects the requests. Example:

> cat(rjson::toJSON(list(a="foo")),"\n")
{"a":"foo"} 
> cat(jsonlite::toJSON(list(a="foo")),"\n")
{"a":["foo"]} 

Either that change has to be reverted or auto_unbox=TRUE must be used with jsonlite.

gordonwoodhull commented 9 years ago

@s-u, did you test auto_unbox=TRUE? I am scared to upgrade rgithub because I have other work to do. I'm hoping we can submit a PR on this.

s-u commented 9 years ago

No, for the same reason (lack of time) I have simply reverted ead1c0d in my fork. Eventually I plan to test auto_unbox=TRUE but I don't know when I get to it.