Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement as.tbl_json.data.frame for #27 #28

Merged
merged 2 commits into from
Apr 3, 2015
Merged

Implement as.tbl_json.data.frame for #27 #28

merged 2 commits into from
Apr 3, 2015

Conversation

jeremystan
Copy link

Closes #27

assert_that(json.column %in% names(x))

# Parse the json
json <- lapply(x[[json.column]], fromJSON, simplifyVector = FALSE)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it clear which fromJSON will get applied? If the user uses both jsonlite and rjson, does it matter which one gets used? rjson::fromJSON might be a good replacement

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And to that end, we should make all of tidyJSON's 3rd party library calls explicit, via: library::method

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's actually jsonlite::fromJSON that is used. jsonlite is imported in R/tidyjson-package.r, and R package namespaces will guarantee tidyjson will always use the jsonlite version of fromJSON.

@adgaudio
Copy link
Contributor

adgaudio commented Apr 3, 2015

after you address my comment, +1

jeremystan pushed a commit that referenced this pull request Apr 3, 2015
Implement as.tbl_json.data.frame, closes #27
@jeremystan jeremystan merged commit 2a65060 into master Apr 3, 2015
@jeremystan jeremystan deleted the df_to_json branch April 3, 2015 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Turn data.frames with a JSON column into a tbl_json object
2 participants