Commit f8d418e
committed
Abstract JSON serialization behind installable serializer packages
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.1 parent 4c070a0 commit f8d418e
56 files changed
Lines changed: 1014 additions & 647 deletions
File tree
- Source
- EventFlow.EntityFramework.Tests
- EventFlow.Examples.Shipping.Queries.InMemory
- EventFlow.Examples.Shipping/Domain/Model
- CargoModel
- Entities
- LocationModel
- VoyageModel
- EventFlow.MongoDB/ValueObjects
- EventFlow.MsSql.Tests/IntegrationTests/ReadStores/ReadModels
- EventFlow.RabbitMQ.Tests/Integration
- EventFlow.Serialization.NewtonsoftJson.Tests
- EventFlow.Serialization.NewtonsoftJson
- Extensions
- EventFlow.Serialization.SystemTextJson.Tests
- EventFlow.Serialization.SystemTextJson
- Extensions
- EventFlow.TestHelpers
- Suites
- EventFlow.Tests
- Exploration
- IntegrationTests
- Aggregates
- Sagas
- UnitTests
- Configuration/Serialization
- EventStores
- Extensions
- ReadStores
- ValueObjects
- EventFlow
- Aggregates
- Core
- Caching
- EventStores/InMemory
- Extensions
- Snapshots
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Large diffs are not rendered by default.
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
44 | | - | |
| 45 | + | |
| 46 | + | |
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
| |||
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
56 | | - | |
| 58 | + | |
| 59 | + | |
57 | 60 | | |
58 | 61 | | |
59 | 62 | | |
60 | 63 | | |
61 | 64 | | |
62 | 65 | | |
63 | | - | |
| 66 | + | |
| 67 | + | |
64 | 68 | | |
65 | 69 | | |
66 | 70 | | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
29 | | - | |
30 | 28 | | |
31 | 29 | | |
32 | 30 | | |
| |||
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
29 | | - | |
30 | 28 | | |
31 | 29 | | |
32 | 30 | | |
| |||
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
31 | | - | |
32 | 30 | | |
33 | 31 | | |
34 | 32 | | |
| |||
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
29 | | - | |
30 | 28 | | |
31 | 29 | | |
32 | 30 | | |
| |||
Lines changed: 0 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
| |||
34 | 33 | | |
35 | 34 | | |
36 | 35 | | |
37 | | - | |
38 | 36 | | |
39 | 37 | | |
40 | 38 | | |
41 | 39 | | |
42 | 40 | | |
43 | | - | |
44 | 41 | | |
45 | 42 | | |
46 | | - | |
47 | 43 | | |
48 | 44 | | |
49 | | - | |
50 | 45 | | |
51 | 46 | | |
52 | | - | |
53 | 47 | | |
54 | 48 | | |
55 | | - | |
56 | 49 | | |
57 | 50 | | |
58 | 51 | | |
Lines changed: 0 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
| |||
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
35 | | - | |
36 | 34 | | |
37 | | - | |
38 | 35 | | |
39 | | - | |
40 | 36 | | |
41 | | - | |
42 | 37 | | |
43 | | - | |
44 | 38 | | |
45 | 39 | | |
46 | 40 | | |
0 commit comments