colearendt / tidyjson

Tidy your JSON data in R with tidyjson
Other
184 stars 15 forks source link

`json_chr()`, `json_dbl()` and `json_lgl()` are mentioned in the README but do not exist #131

Closed ramiromagno closed 2 years ago

ramiromagno commented 3 years ago

https://github.com/colearendt/tidyjson/blob/7205b9f3ec6b463185dddcb4a6aee6278e9a17b1/README.Rmd#L87-L89

colearendt commented 3 years ago

Yeah sorry about that!! These are currently jnumber, jstring, jlogical. I can't remember whether json_* was the "new" pattern or the "old" one and exactly what happened, but I will track it down - thanks for reporting!

ramiromagno commented 3 years ago

btw: I would find it convenient to have jnumber split into jinteger and jdouble. What do you think?

colearendt commented 3 years ago

I think that's a good idea! The implementation isn't front of mind at present, but I like the idea of being declarative / type-safe. IIRC the reason jnumber was implemented is because JSON itself doesn't have a distinction between integer / double.