Skip to content

Add test_empty_string_key to verify RFC 8259 empty-string key handling#33

Merged
ionux merged 1 commit intomainfrom
claude/empty-string-json-key-ffxT7
Mar 12, 2026
Merged

Add test_empty_string_key to verify RFC 8259 empty-string key handling#33
ionux merged 1 commit intomainfrom
claude/empty-string-json-key-ffxT7

Conversation

@ionux
Copy link
Copy Markdown
Owner

@ionux ionux commented Mar 12, 2026

Adds a test that parses {"": "value"} and confirms:

  • okj_parse() returns OKJ_SUCCESS
  • The key token has type OKJ_STRING and length == 0
  • okj_get_string(&parser, "") returns the correct value token
  • The zero-iteration path in okj_match() and the length == 0 branch in okj_find_value_index() are exercised without looping or underflowing

https://claude.ai/code/session_01N6hRUzs1bW2ekwUjqDzv1r

Adds a test that parses {"": "value"} and confirms:
- okj_parse() returns OKJ_SUCCESS
- The key token has type OKJ_STRING and length == 0
- okj_get_string(&parser, "") returns the correct value token
- The zero-iteration path in okj_match() and the length == 0 branch in
  okj_find_value_index() are exercised without looping or underflowing

https://claude.ai/code/session_01N6hRUzs1bW2ekwUjqDzv1r
@ionux ionux merged commit c586f05 into main Mar 12, 2026
2 checks passed
@ionux ionux deleted the claude/empty-string-json-key-ffxT7 branch March 12, 2026 02:11
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