-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove validation that made keys starting or ending with . - or _ invalid, catch all exceptions in the parse json processor #2936
Conversation
…alid, catch all exceptions in the parse json processor Signed-off-by: Taylor Gray <tylgry@amazon.com>
writeToRoot(event, parsedJson); | ||
} else { | ||
event.put(destination, parsedJson); | ||
final Event event = record.getData(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: seems like this block is double indented which is showing more of a diff than there actually is
} | ||
|
||
if ((i == 0 || i == key.length() - 1 || previous == '/' || next == '/') && (c == '_' || c == '.' || c == '-')) { | ||
return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What was the motivation for not allowing these characters initially? I'm wondering what the consequences of this change would be
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure what the reasoning was
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the PR where I added this custom code (https://github.com/opensearch-project/data-prepper/pull/725/files). But the regex pattern that was used to validate before (which disallowed starting or ending with these characters) was added by @cmanning09
Moved to #2945 |
Description
.
,-
, or_
in JacksonEventparse_json
processorIssues Resolved
[List any issues this PR will resolve]
Check List
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.