opensearch-project / opensearch-project/data-prepper

Add support for additional character in JacksonEvent get by key methods

Open
#1,190 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

backlog enhancement
Dominant language
Java
Stars
374
Forks
354
Avg merge
3d 18h
Merged PRs (30d)
8

Description

Is your feature request related to a problem? Please describe.
Today JacksonEvent.get() checks if the key matches the pattern ^[A-Za-z0-9]+([A-Za-z0-9.-_][A-Za-z0-9])*$. If the key does not match an IllegalArgumentException is thrown by JacksonEvent.checkKey(. Internally JacksonEvent.get() uses a Jackson JsonPointer for key lookups.

Describe the solution you'd like
Update JacksonEvent.checkKey( to support the full set of characters supported by JsonPointer

Describe alternatives you've considered (Optional)
Supporting a subset of JsonPointer supported characters.

Additional context
Creating JacksonEvents using a wider set of key characters will need additional testing, not all character may work with the existing model.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review data-prepper-api/src/main/java/com/amazon/dataprepper/model/event/JacksonEvent.java, especially get() and checkKey(), and compare the current validation with the characters supported by Jackson JsonPointer. Add tests for wider key characters and confirm that get-by-key works without IllegalArgumentException; done means the relevant tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.