Skip to content
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

feat: Allow JSONata based transformations in JSON serializer #11251

Merged
merged 9 commits into from
Jul 21, 2022

Conversation

srebhan
Copy link
Member

@srebhan srebhan commented Jun 3, 2022

replaces #11205

This PR adds a new json_transformation option to the JSON serializer. This new option can be used to transform the JSON output using the JSONata language to accommodate for requirements on the receiver side. Additional benefits are the various filtering and processing capabilities of the introduced language (see README for a few basic examples).

@telegraf-tiger telegraf-tiger bot added the feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin label Jun 3, 2022
@reimda
Copy link
Contributor

reimda commented Jun 6, 2022

This looks very useful. It seems like JSONata is just what the serializer needed.

@srebhan srebhan added the area/json json and json_v2 parser/serialiser related label Jun 7, 2022
@srebhan
Copy link
Member Author

srebhan commented Jun 7, 2022

@reimda so you approve it? :-D

@srebhan srebhan mentioned this pull request Jul 5, 2022
3 tasks
@srebhan srebhan requested review from sspaink and reimda July 12, 2022 07:36
Copy link
Contributor

@sspaink sspaink left a comment

Choose a reason for hiding this comment

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

This looks really useful! two minor comments, but I think it looks good.

go.mod Outdated Show resolved Hide resolved
plugins/serializers/json/json_test.go Outdated Show resolved Hide resolved
@telegraf-tiger
Copy link
Contributor

@sspaink sspaink added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Jul 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/json json and json_v2 parser/serialiser related feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants