Skip to content

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

Description

@JeroenSoeters

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.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions