Skip to content

Conversation

@adityaalifn
Copy link
Contributor

@adityaalifn adityaalifn commented Oct 22, 2025

Submit a pull request

CLA

  • I have signed the Stream CLA (required).
  • The code changes follow best practices
  • Code changes are tested (add some information if not applicable)

Description of the pull request

The ObjectMapper configuration added in PR #205 set PropertyAccessor.GETTER visibility to NONE, which disabled ALL getter methods including those annotated with @JsonAnyGetter. This broke serialization of additionalFields in channels and messages, causing custom object fields to appear as empty.

Changed to use field-based serialization while still respecting explicit Jackson annotations (@JsonAnyGetter, @JsonProperty, etc):

  • Set PropertyAccessor.ALL to NONE (disable auto-detection)
  • Set PropertyAccessor.FIELD to ANY (use field-based serialization)

This preserves the intent of PR #205 (avoiding getter auto-detection) while fixing additionalFields serialization.

…ization

The ObjectMapper configuration added in PR #205 set PropertyAccessor.GETTER
visibility to NONE, which disabled ALL getter methods including those
annotated with @JsonAnyGetter. This broke serialization of additionalFields
in channels and messages, causing custom object fields to appear as empty.

Changed to use field-based serialization while still respecting explicit
Jackson annotations (@JsonAnyGetter, @JsonProperty, etc):
- Set PropertyAccessor.ALL to NONE (disable auto-detection)
- Set PropertyAccessor.FIELD to ANY (use field-based serialization)

This preserves the intent of PR #205 (avoiding getter auto-detection)
while fixing additionalFields serialization.

Fixes: #205
@adityaalifn adityaalifn requested a review from shaljam October 22, 2025 13:32
@adityaalifn adityaalifn merged commit cfbc54f into main Oct 22, 2025
1 check failed
@adityaalifn adityaalifn deleted the fix/jackson-anygetter-visibility branch October 22, 2025 13:36
@github-actions github-actions bot mentioned this pull request Oct 22, 2025
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.

3 participants