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

Improve the command JSON.MERGE via jsonpath::remove #1919

Merged

Conversation

2rueSid
Copy link
Contributor

@2rueSid 2rueSid commented Dec 5, 2023

Updated JSON.MERGE command

  1. Handle null case with jsoncons::jsonpath::remove(value, path);`
  2. Handle non-existing key Create an object from path danielaparker/jsoncons#468

@PragmaTwice can you please review PR.

Also, I can update SET command to handle non-existing key, as in this example:

redis> JSON.SET doc $ '{"a":2}'
OK
redis> JSON.SET doc $.b '8'
OK
redis> JSON.GET doc $
"[{\"a\":2,\"b\":8}]"

Copy link

sonarcloud bot commented Dec 5, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@PragmaTwice PragmaTwice changed the title Json merge command update cases Improve the command JSON.MERGE via jsonpath::remove Dec 5, 2023
Copy link
Member

@PragmaTwice PragmaTwice left a comment

Choose a reason for hiding this comment

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

LGTM

@PragmaTwice PragmaTwice merged commit c17a8cb into apache:unstable Dec 5, 2023
30 checks passed
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

Successfully merging this pull request may close these issues.

2 participants