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

DOC-3787 add missing code samples for JSON #3229

Merged
merged 6 commits into from
May 15, 2024

Conversation

andy-stark-redis
Copy link

Pull Request check-list

Please make sure to review and check all of these items:

  • Do tests and lints pass with this change?
  • Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Is there an example added to the examples folder (if applicable)?
  • Was the change added to CHANGES file?

NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.

Description of change

Python examples for the JSON datatype page are available in the repo but haven't been added to the page yet. While adding them, I discovered that the Python samples don't match the CLI samples in a few places, so I've updated them.

doctests/dt_json.py Show resolved Hide resolved
@@ -267,7 +292,17 @@
assert res12 == [1820, 1972, 3164, 1375, 3841]
# REMOVE_END

# STEP_START update_filters
# STEP_START update_filters1
res16 = r.json().set("bikes:inventory", "$.inventory.*[?(@.price<2000)].price", 1500)
Copy link
Contributor

Choose a reason for hiding this comment

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

The names are out of order, 16 and 17, then 14 and 15.

@gerzse gerzse merged commit 35e4850 into redis:emb-examples May 15, 2024
2 checks passed
@andy-stark-redis andy-stark-redis deleted the emb-examples branch May 15, 2024 12:42
@andy-stark-redis andy-stark-redis restored the emb-examples branch May 16, 2024 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants