opensearch-project / opensearch-project/data-prepper
Add support for additional character in JacksonEvent get by key methods
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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