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

Allow fetching raw option value for JSON encoded / PHP serialized options #165

Closed
johnbillion opened this issue Apr 7, 2018 · 4 comments

Comments

@johnbillion
Copy link
Contributor

When calling wp option list, the option values are displayed in their raw format.

When calling wp option get <key>, there's no way to get the raw value for a JSON encoded or PHP serialized value.

@danielbachhuber
Copy link
Member

@johnbillion Just to clarify, this would be the value in the database?

While wp option get could support --format=raw, is there syntax you'd suggest for wp option list?

@johnbillion
Copy link
Contributor Author

wp option list always shows the raw value for options. It could be extended to support the full list of formats (JSON, CSV, etc) but I'm not sure how useful that is.

@shawnhooper
Copy link
Contributor

Added the --format=raw to the wp option get command in the PR above.

The wp option list already has a formatter supporting:

  - table
  - json
  - csv
  - count
  - yaml
  - total_bytes

which I assume was added after this ticket was created.

@swissspidy
Copy link
Member

Marking this as a wontfix based on the discussion at #446

@swissspidy swissspidy closed this as not planned Won't fix, can't repro, duplicate, stale May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants