-
Notifications
You must be signed in to change notification settings - Fork 251
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
feat: enhance TypeManager to support multiple serialization contexts #1586
feat: enhance TypeManager to support multiple serialization contexts #1586
Conversation
0865f6c
to
13097e3
Compare
spi/core-spi/src/main/java/org/eclipse/dataspaceconnector/spi/types/TypeManager.java
Outdated
Show resolved
Hide resolved
spi/core-spi/src/main/java/org/eclipse/dataspaceconnector/spi/types/TypeManager.java
Outdated
Show resolved
Hide resolved
spi/core-spi/src/main/java/org/eclipse/dataspaceconnector/spi/types/TypeManager.java
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## main #1586 +/- ##
==========================================
- Coverage 67.79% 67.77% -0.02%
==========================================
Files 759 759
Lines 16386 16401 +15
Branches 1049 1049
==========================================
+ Hits 11109 11116 +7
- Misses 4798 4806 +8
Partials 479 479
Continue to review full report at Codecov.
|
13097e3
to
833bef1
Compare
@Test | ||
void verifySerialization() throws JsonProcessingException { | ||
var manager = new TypeManager(); | ||
manager.registerSerializer("foo", Bar.class, new JsonSerializer<>() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm late to the party but this test should be more strict as it succeed also if the serializer is not registered.
What this PR changes/adds
Adds methods to register custom ObjectMappers and serialization contexts by type.
Why it does that
Provide the possibility to support de/serialization of multiple contexts.
Further notes
See decision record in #1582. Example will be provided with adding an IDS context (see #1541).
Linked Issue(s)
Closes #1581
Checklist
no-changelog
)