Skip to content

Conversation

stefankoegl
Copy link
Owner

Expect the path and from attributes of patches also as JsonPointer instances.

As described in #60, if a user has these paths already in a pointer object, it needs to be serialized to a string just to be re-parsed within JsonPatch.

This avoids the unnecessary roundtrip and lets the user create patches like

    pointer = jsonpointer.JsonPointer('/foo')
    patch = jsonpatch.JsonPatch([                                           
        {'op': 'add', 'path': pointer, 'value': 'bar'},
    ])                                                                      

@stefankoegl stefankoegl merged commit 0c96a53 into master Apr 2, 2018
@stefankoegl stefankoegl deleted the jsonptr branch April 2, 2018 15:55
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.

1 participant