pjfanning opened a new pull request, #3649:
URL: https://github.com/apache/pekko/pull/3649

   ### Motivation
   
   Almost every application using Jackson serialization defines its own marker 
trait/interface and binds it to
   `jackson-json` or `jackson-cbor` in `serialization-bindings`. Pekko already 
had such markers, but only in the
   test scope, so users could not reuse them.
   
   ### Modification
   
   - Move `JsonSerializable` and `CborSerializable` from the test scope to the 
main scope of
     `serialization-jackson` (`org.apache.pekko.serialization.jackson`) and 
`serialization-jackson3`
     (`org.apache.pekko.serialization.jackson3`), keeping the same fully 
qualified class names.
   - Bind them to `jackson-json` and `jackson-cbor` in the `reference.conf` of 
both modules and remove the
     test-only `reference.conf` that held the same bindings.
   - Use the predefined `JsonSerializable` in the documentation samples instead 
of a custom `MySerializable`
     marker, and update the Jackson serialization docs (custom markers are 
still documented).
   - Remove the unused docs-local marker traits and their bindings from the 
docs `SerializationDocSpec`.
   - Add a test that the predefined markers are bound by `reference.conf` alone 
and round trip through the JSON
     and CBOR serializers.
   
   ### Result
   
   Users can extend/implement `JsonSerializable` or `CborSerializable` without 
any `serialization-bindings`
   configuration. Custom marker bindings keep working as before.
   
   ### Tests
   
   - Not run locally - left to CI
   
   ### References
   Ported from (Apache-2.0 since 2026-10-23):
   - https://github.com/akka/akka-core/pull/32049
   
   ### Notes for reviewers
   - Binary compatibility: only new public traits are added; no MiMa excludes.
   - Wire compatibility: no new serializer, serializer id or manifest; messages 
using the markers are serialized
     exactly like messages using a user-defined marker bound to the same 
serializer.
   - Config defaults: `reference.conf` of each Jackson module now has two 
bindings. Users who already bind a class
     that also extends one of the new markers (unlikely, since they are new) 
would get the usual "multiple
     serializers" ambiguity warning only if the bindings conflict.
   - Other modules' tests that used the test-scope markers via `test->test` 
dependencies now get the main-scope
     traits with the same FQCN, so no source changes were needed there.
   - Java doc samples: the `MySerializable.java` file name was kept so existing 
`@@snip` paths stay valid; it now
     only contains `MyMessage implements JsonSerializable`.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to