Abstract JSON serialization behind installable serializer packages#1147
Draft
MMonrad wants to merge 1 commit into
Draft
Abstract JSON serialization behind installable serializer packages#1147MMonrad wants to merge 1 commit into
MMonrad wants to merge 1 commit into
Conversation
|
|
fcedc31 to
58013d9
Compare
58013d9 to
7e2b29d
Compare
7e2b29d to
bf44a87
Compare
bf44a87 to
f8d418e
Compare
Core EventFlow no longer depends on Newtonsoft.Json. JSON serialization is now provided by separate, client-selectable packages: - EventFlow.Serialization.NewtonsoftJson (AddNewtonsoftJson) - EventFlow.Serialization.SystemTextJson (AddSystemTextJson) Core changes (breaking): - Removed JsonSerializer, SingleValueObjectConverter, IJsonOptions/JsonOptions/ ChainedJsonOptions, JsonOptionsExtensions and ConfigureJson from core. - Dropped the Newtonsoft.Json package reference. - Added ThrowingJsonSerializer as the default IJsonSerializer so a missing serializer registration fails fast with an actionable message. - Removed Newtonsoft serialization attributes from core/sub-package types ([JsonIgnore] on Metadata/SnapshotMetadata, [JsonConverter] on CacheKey, [JsonProperty] on MongoDB data models, [JsonConverter] on example ids). These were inert under the dictionary/BSON contracts. - InMemoryEventPersistence now uses the injected IJsonSerializer. Behavior preserved: SingleValueObjects keep serializing as objects by default (the bare-value SingleValueObjectConverter remains an opt-in), so existing event/snapshot stores remain readable. Added a provider-agnostic TestSuiteForJsonSerializer conformance suite; both serializer packages pass it. Test bootstrapping and EventFlow.Tests updated to register Newtonsoft explicitly. Note: EventFlow.AspNetCore is not part of the solution and is left untouched.
f8d418e to
91b895e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Core EventFlow no longer depends on Newtonsoft.Json. JSON serialization is now provided by separate, client-selectable packages:
Core changes (breaking):
Behavior preserved: SingleValueObjects keep serializing as objects by default (the bare-value SingleValueObjectConverter remains an opt-in), so existing event/snapshot stores remain readable.
Added a provider-agnostic TestSuiteForJsonSerializer conformance suite; both serializer packages pass it. Test bootstrapping and EventFlow.Tests updated to register Newtonsoft explicitly.
Note: EventFlow.AspNetCore is not part of the solution and is left untouched.