Skip to content

Fix : preserve json serializer options - #4107

Merged
iancooper merged 9 commits into
BrighterCommand:masterfrom
isakovich:fix/preserve-json-serializer-options
May 13, 2026
Merged

iancooper merged 9 commits into
BrighterCommand:masterfrom
isakovich:fix/preserve-json-serializer-options

Conversation

@isakovich

Copy link
Copy Markdown
Contributor

Description

Fix ConfigureJsonSerialisation to preserve existing JsonSerializerOptions instead of overriding them with a new instance. The current implementation instantiates a new JsonSerializerOptions object, discarding any previously configured settings. This change ensures existing configuration is preserved while adding/modifying JustSaying-specific options.

Related Issues

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the Contributing Guide
  • I have checked the documentation for relevant guidance
  • I have added/updated XML documentation for any public API changes
  • I have added/updated tests as appropriate
  • My changes follow the existing code style and conventions

Additional Notes

Added tests to verify that JustSaying message properties (Id, Conversation, RaisingComponent, Tenant, Version, TimeStamp) are preserved during serialization and not overwritten, including scenarios where properties come from the request context or publication.

@CLAassistant

CLAassistant commented Apr 28, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

@isakovich
isakovich marked this pull request as ready for review April 29, 2026 09:26
@iancooper iancooper added Bug .NET Pull requests that update .net code V10.X labels Apr 30, 2026
codescene-delta-analysis[bot]

This comment was marked as outdated.

@iancooper

Copy link
Copy Markdown
Member

@isakovich Could you sign the CLA (you keep the IP, you just license it to us)

@iancooper iancooper left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, but I need you to sign the CLA. It protects you, as much as us.

codescene-delta-analysis[bot]

This comment was marked as outdated.

@isakovich
isakovich force-pushed the fix/preserve-json-serializer-options branch from d86300b to 51fac81 Compare May 3, 2026 07:46
codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

@iancooper

Copy link
Copy Markdown
Member

@isakovich Held up because our build breaks due to an advisory being issued by GHA against Snappier, which our MongoDb drivers depend on. See mongodb/mongo-csharp-driver#1989

Once we can get a fix, and we can get builds again, we can move forward. I assume it will be soon.

codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

@codescene-delta-analysis codescene-delta-analysis Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Gates Passed
4 Quality Gates Passed

See analysis details in CodeScene

Quality Gate Profile: Clean Code Collective
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3 - Done Bug .NET Pull requests that update .net code V10.X

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants