Skip to content

Preserve explicit null hash fields - #67

Open
OskarEichler wants to merge 1 commit into
jmespath:mainfrom
OskarEichler:codex/explicit-null-fields
Open

Preserve explicit null hash fields#67
OskarEichler wants to merge 1 commit into
jmespath:mainfrom
OskarEichler:codex/explicit-null-fields

Conversation

@OskarEichler

Copy link
Copy Markdown

Summary

Use hash key ownership, rather than value truthiness, before falling back from string keys to symbol keys.

Reproduction

For {"foo" => nil, :foo => "fallback"}, querying foo currently returns the symbol value even though the canonical string field is explicitly null. Both single and optimized chained fields now preserve the string-key null while symbol-only hashes remain supported.

Verification

  • isolated branch: 1,790 examples, zero failures
  • three focused single/chained/symbol-fallback checks
  • cumulative candidate: 892 current compliance checks, zero failures
  • all runtime syntax and Rails 8.1.3.1 integration pass

Compatibility

Symbol fallback remains unchanged when no string key exists. Prepared with AI-assisted source review; no repository tests were changed.

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.

1 participant