You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rather than ripping out a specific serialiser, you should:
Remove the entire static block linked to above
Create a child TypeSerializerCollection - TypeSerializers.getDefaultSerializers().newChild()
Add your custom serialiser to that (child serialisers have higher priority than their parents)
Use this child serialiser collection when creating a loader (via the ConfigurationOptions#withSerializers in 3.7, setSerializers prior to that). While you're there, you should create an ObjectMapperFactory for your object mapper and set it in those options too.
That way, the projects that want to use your extensions can, while those that don't aren't forced to anyway. I get that you might see this as completely compatible with the standard object mapper - that's fine, but it's not compatible with my object mapper. Please stop forcing people to use your mapper when this project is being used.
The text was updated successfully, but these errors were encountered:
@dualspiral thanks for reporting, im aware of this but i no longer need this library in my projects so i cannot say when or if this gets ever fixed.
Tbh best option would be to put these features to configurate
It was a fast hack to make it work as i wanted.
Eventually i discovered that former version of configurate lacks too much features i was hoping for, so i switched to nightconfig.
ConfigurateButWithBlackjackAndHookers/src/main/java/cz/neumimto/config/blackjack/and/hookers/NotSoStupidObjectMapper.java
Lines 41 to 58 in 39d5fc8
This is completely unnecssary and prevents other users from using their own object mapper without having to resort to their own hacks/workarounds. For example, you are breaking Nucleus. You should not be forcing people to use your object mapper like you do here.
Rather than ripping out a specific serialiser, you should:
TypeSerializerCollection
-TypeSerializers.getDefaultSerializers().newChild()
ConfigurationOptions#withSerializers
in 3.7,setSerializers
prior to that). While you're there, you should create anObjectMapperFactory
for your object mapper and set it in those options too.That way, the projects that want to use your extensions can, while those that don't aren't forced to anyway. I get that you might see this as completely compatible with the standard object mapper - that's fine, but it's not compatible with my object mapper. Please stop forcing people to use your mapper when this project is being used.
The text was updated successfully, but these errors were encountered: