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

Fix how nesting is handled in json_v2 parser #9504

Merged
merged 1 commit into from
Jul 23, 2021

Conversation

sspaink
Copy link
Contributor

@sspaink sspaink commented Jul 14, 2021

  • Wrote appropriate unit tests.

@sjwang90 found another valid issue with the json_v2 parser. Resolved it by simplifying how nesting is handled, for every nested array it will crate a new line protocol. Benefit is that it does now follow the documentation and the code is simpler. Also noticed that the methods can just return []telegraf.metric making it easier to read.

Added a new input.json that caught this issue.

@sspaink sspaink requested a review from sjwang90 July 14, 2021 18:18
@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 Jul 14, 2021
@sspaink sspaink added area/json_v2 fix pr to fix corresponding bug and removed feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin labels Jul 14, 2021
Copy link
Contributor

@sjwang90 sjwang90 left a comment

Choose a reason for hiding this comment

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

This worked for me!

@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, 2021
@sspaink sspaink merged commit d6b7d4d into influxdata:master Jul 23, 2021
reimda pushed a commit that referenced this pull request Jul 28, 2021
@Hipska Hipska added the area/json json and json_v2 parser/serialiser related label Feb 15, 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 fix pr to fix corresponding bug 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.

4 participants