[go: up one dir, main page]

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

FR: support 'octmode' #407

Open
r2evans opened this issue Dec 2, 2022 · 0 comments
Open

FR: support 'octmode' #407

r2evans opened this issue Dec 2, 2022 · 0 comments

Comments

@r2evans
Copy link
r2evans commented Dec 2, 2022

In one of my logs I sometimes need to include results from file.info(.). Unfortunately, the returned mode is class octmode and throws the error

jsonlite::toJSON(file.info("does_not_exist"))
# Error: No method asJSON S3 class: octmode

Three ways it might be handled: as.integer, as.character, and paste0("0", .) (a nod towards the 0-prepend for octal in javascript). All have some merit; none of them support perfect round-trip transformation, though contextually the last (paste0) might suggest it.

What are your thoughts on this?

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

No branches or pull requests

1 participant