Skip to content

Conversation

alexdutton
Copy link
Contributor

The RFC says that the path "" points at the original document. However, passing [] to from_parts() results in a path of "/" (the same as when one passes [""]. This makes the empty list produce a pointer for the empty path.

Alexander Dutton and others added 3 commits March 26, 2014 14:30
[The RFC says](http://tools.ietf.org/html/rfc6901#page-5) that the path `""` points at the original document. However, passing `[]` to `from_parts()` results in a path of `"/"` (the same as when one passes `[""]`. This makes the empty list produce a pointer for the empty path.
@alexdutton
Copy link
Contributor Author

I've just added a test that makes sure that paths and parts each round-trip. Previously this test would have failed.

stefankoegl added a commit that referenced this pull request Mar 30, 2014
JsonPointer.from_parts should handle the empty path
@stefankoegl stefankoegl merged commit b943244 into stefankoegl:master Mar 30, 2014
@stefankoegl
Copy link
Owner

Merged, thanks :)

@alexdutton alexdutton deleted the patch-1 branch March 31, 2014 12:58
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