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

[json status and reporter] Include null fields in serialized JSON #331

Merged
merged 2 commits into from
Sep 22, 2020

Conversation

olivielpeau
Copy link
Member

To keep pre-existing behavior that changed with #321.

Apparently com.fasterxml.jackson.databind.ObjectMapper used to serialize null fields, whereas com.fasterxml.jackson.jr.ob.JSON doesn't anymore by default (need to enable this property: http://fasterxml.github.io/jackson-jr/javadoc/2.5/com/fasterxml/jackson/jr/ob/JSON.Feature.html#WRITE_NULL_PROPERTIES).

  • The change didn't break the agent's parsing of the status, but I still changed back to pre-existing behavior.
  • The change did break e2e integrations-core tooling, which is parsing the output of the JSONReporter.

Testing: I tested the resulting jar with a local agent, JMXFetch's status still reports fine in the agent's status page.

@olivielpeau olivielpeau requested a review from truthbk September 22, 2020 19:42
@truthbk truthbk merged commit e131c21 into master Sep 22, 2020
@truthbk truthbk deleted the olivielpeau/json-include-null-values branch September 22, 2020 20:58
@richardstartin
Copy link
Member

Oh, sorry about this. This was the change which worried me since it doesn't seem to be possible to test it automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants