stefankoegl / python-json-pointer

Resolve JSON Pointers in Python
https://python-json-pointer.readthedocs.org/
Other
141 stars 43 forks source link

JsonPointer.from_parts should handle the empty path #7

Closed alexdutton closed 10 years ago

alexdutton commented 10 years ago

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.

alexdutton commented 10 years ago

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

stefankoegl commented 10 years ago

Merged, thanks :)