Skip to content

Commit

Permalink
Allow ~ in keys for escaped json pointer characters (opensearch-proje…
Browse files Browse the repository at this point in the history
…ct#5111)

Signed-off-by: Taylor Gray <[email protected]>
  • Loading branch information
graytaylor0 authored Oct 29, 2024
1 parent 68572c0 commit e59917d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ private static boolean isValidKey(final String key) {
|| c == '.'
|| c == '-'
|| c == '_'
|| c == '~'
|| c == '@'
|| c == '/'
|| c == '['
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ void constructor_throws_with_invalid_key(final String key) {
"key-with-hyphen",
"key_with_underscore",
"key@with@at",
"key[with]brackets"
"key[with]brackets",
"key~1withtilda"
})
void getKey_returns_expected_result(final String key) {
assertThat(new JacksonEventKey(key).getKey(), equalTo(key));
Expand Down

0 comments on commit e59917d

Please sign in to comment.