Skip to content

[BUGFIX] JsonPointer should not index into strings - #76

Merged
stefankoegl merged 2 commits into
stefankoegl:masterfrom
angela-tarantula:forbid-str-indexing
Oct 1, 2026
Merged

stefankoegl merged 2 commits into
stefankoegl:masterfrom
angela-tarantula:forbid-str-indexing

Conversation

@angela-tarantula

@angela-tarantula angela-tarantula commented Mar 24, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #70

Thank you! Using your library :)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The fix is targeted, RFC-compliant, and adequately covered by regression tests.

Review effort: Balanced
Findings: None

What changed in this PR

Prevents RFC 6901 pointers from indexing into JSON strings.

Changes:

  • Rejects pointer tokens applied to strings.
  • Adds regression tests for both resolution APIs.
File Description
jsonpointer.py Raises an exception when traversing strings.
tests.py Verifies strings cannot be indexed.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@stefankoegl
stefankoegl merged commit 16c4c8e into stefankoegl:master Oct 1, 2026
6 checks passed
@stefankoegl

Copy link
Copy Markdown
Owner

Thanks!

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.

BUG: JsonPointer indexes into strings (RFC 6901 non-compliant)

3 participants