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

"auto_unbox = TRUE" does not unbox vector corresponding to one data.frame #397

Open
apsalverda opened this issue Jul 21, 2022 · 0 comments

Comments

@apsalverda
Copy link

toJSON(list(x = 1, y = data.frame(a = 2, b = 3)), pretty = TRUE, auto_unbox = TRUE)
{
  "x": 1,
  "y": [
    {
      "a": 2,
      "b": 3
    }
  ]
}

Note that unbox does not work even though y is a vector containing 1 object. Desired output is:

{
  "x": 1,
  "y": {
    "a": 2,
    "b": 3
    }
}
@apsalverda apsalverda changed the title "auto_unbox = TRUE" does not unbox vector correspondong to one data.frame "auto_unbox = TRUE" does not unbox vector corresponding to one data.frame Jul 21, 2022
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