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

"xo" need option to make JSON object wrapper #60

Closed
philshafer opened this issue Sep 11, 2018 · 1 comment
Closed

"xo" need option to make JSON object wrapper #60

philshafer opened this issue Sep 11, 2018 · 1 comment
Assignees

Comments

@philshafer
Copy link

philshafer commented Sep 11, 2018

$ xo --wrap "a/b/c" --json --pretty "{:name}{:value}\n" one a
"a": {
  "b": {
    "c": {
      "name": "one",
      "value": "a"
    }
  }
}

which isn't a complete json object. A "--object-wrapper" option should put the entire output inside a "{}" wrapper. This should be true for "--open" and "--close" as well.

@philshafer philshafer self-assigned this Sep 11, 2018
@philshafer
Copy link
Author

This is in the "develop" branch as "--top-wrap".

Thanks,
Phil

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant