Skip to content

Reject JSON Pointer indexing into strings#183

Open
gaoflow wants to merge 1 commit into
stefankoegl:masterfrom
gaoflow:fix-string-pointer-index-178
Open

Reject JSON Pointer indexing into strings#183
gaoflow wants to merge 1 commit into
stefankoegl:masterfrom
gaoflow:fix-string-pointer-index-178

Conversation

@gaoflow

@gaoflow gaoflow commented Jun 22, 2026

Copy link
Copy Markdown

Summary

  • reject JSON Pointer path resolution when an operation tries to index into a string value
  • cover remove, move, copy, and test operation paths that previously treated strings as arrays
  • preserve existing conflict/test-failure exception behavior for patch operations

Tests

  • python -m unittest tests.ApplyPatchTestCase.test_remove_does_not_index_string tests.ApplyPatchTestCase.test_move_does_not_index_string tests.ApplyPatchTestCase.test_copy_does_not_index_string tests.ApplyPatchTestCase.test_test_does_not_index_string
  • python tests.py
  • python -m compileall jsonpatch.py tests.py
  • git diff --check

Closes #178

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: JSON Patch operations sometimes treat strings as arrays (RFC 6902 non-compliant)

1 participant