Skip to content

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

Open
@JeroenSoeters

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions