Skip to content

Hash "#" prefix? #84

Description

@rob-ross

Can you explain what the hash prefix does and how you intend it to work? I've got all but 3 tests in test_json_pointer.py passing. But I'm not exactly sure how the hash symbol is supposed to work. Can you explain this test case?

def test_non_standard_index_pointer() -> None:
    data = {"foo": {"bar": [1, 2, 3], "#baz": "hello"}}
    assert JSONPointer("/foo/bar/#1").resolve(data) == 1
    with pytest.raises(JSONPointerIndexError):
        JSONPointer("/foo/bar/#9").resolve(data)

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions