Skip to content

Support for replacing JSON field when Kind doesn't match #91

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

Open
JeroenSoeters opened this issue May 13, 2025 · 0 comments
Open

Support for replacing JSON field when Kind doesn't match #91

JeroenSoeters opened this issue May 13, 2025 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed v2

Comments

@JeroenSoeters
Copy link

JeroenSoeters commented May 13, 2025

Often I want to update a JSON field with a different type of value. Like:

{
    "property": "value"
}

to

{
    "property": { "nested": "value" }
}

Right now this is not possible as the walker returns an error if the Kind doesn't match. It would be useful if there was an Option to configure this behavior. Instead of throwing an error it would add a replace operation to the patch. We would still default to returning the error of course.

Let me know if this makes sense and I can open a PR for this.

@snorwin snorwin added help wanted Extra attention is needed enhancement New feature or request v2 labels May 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed v2
Projects
None yet
Development

No branches or pull requests

2 participants