Skip to content

Allow ~ in keys for escaped json pointer characters#5111

Merged
graytaylor0 merged 1 commit intoopensearch-project:mainfrom
graytaylor0:AllowKey
Oct 29, 2024
Merged

Allow ~ in keys for escaped json pointer characters#5111
graytaylor0 merged 1 commit intoopensearch-project:mainfrom
graytaylor0:AllowKey

Conversation

@graytaylor0
Copy link
Copy Markdown
Member

@graytaylor0 graytaylor0 commented Oct 25, 2024

Description

Json pointer uses ~ character as the escape sequence in some places. For example, a literal / in the key name will be escaped with ~1, but Data Prepper JacksonEventKey is blocking this by not allowing ~ character

Issues Resolved

Resolves #5101

Check List

  • New functionality includes testing.
  • New functionality has a documentation issue. Please link to it in this PR.
    • New functionality has javadoc added
  • Commits are signed with a real name per the DCO

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

|| c == '.'
|| c == '-'
|| c == '_'
|| c == '~'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please include this in the unit tests.

Signed-off-by: Taylor Gray <tylgry@amazon.com>
Copy link
Copy Markdown
Collaborator

@oeyh oeyh left a comment

Choose a reason for hiding this comment

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

Thanks for adding this!

@graytaylor0 graytaylor0 merged commit e59917d into opensearch-project:main Oct 29, 2024
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] Escaping of "/" in json pointers

3 participants