Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
CaseInsensitiveHeaders.class is not serializable, provide a default Jackson stdSerializer and stdDeserializer for optional use #1146
Comments
|
However this should be against core as JSON serializers are defined there. |
|
Are you saying where this code would go? |
|
why is this necessary ? |
|
for web session ? |
|
Which part? The reason for sending the headers is defined in original issue text. The ability to send headers into verticle config or through event bus. In the default setup it cannot be serialized into json as per the issue outlined. |
|
ok, I think then it would be better to be java serializable than Jackson serializable, as we want to decouple from jackson |
|
If you are decoupling from Jackson, are you transitioning to using serializable as the default data format for the bus and config? Any blog or write up on this decoupling? |
|
it is for vert.x 4, actually the event bus has its own serialisation mechanism which is used for Buffer, we could have an event bus serializer for MultiMap as well |
|
that being said Jackson will still be used in Vert.x 4, but we don't want to expose Jackson APIs or make it mandatory. |
|
In Vert.x 4 we can create a codec for |
|
EventBus uses Java serialization and not json, so why this discussion relates to JSON ? |
|
The problem is encoding/decoding to JSON object to add it to JSON configs or send through the event bus. JSON encode/decode seems a more general solution for this problem |
|
sure @slinkydeveloper that being said I don't want to turn every object in Vert.x into json encoding/decoding (at least in the vertx project) In addition this issue mentions issues with the Event Bus serialisation, not general JSON serialisation as far as I could read. |
abilioesteves
mentioned this issue

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

The CaseInsensitiveHeaders.class does not support serialization. This is a problem when you want to do things like passing common headers into verticles through config(). (JsonObject).
Would be great if a jackson stdSerializer and stdDeserilizer were provided to optionally support this.
here is my implementation that can be reused by others, and hopefully can be added in the web client in the future
and in a class somewhere when you need to capture these you can do:
In your Verticle you can do
SomeClassHoldingMyheaders externalTaskOptions = Json.decodeValue(config().getString("headers"), SomeClassHoldingMyheaders.class)and in your verticle that deploys the verticle using the config you can do
Where myHeaders is your
SomeClassHoldingMyheaders.classinstance