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
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Micronaut application uses
com.fasterxml.jackson.core
jackson-databind
When Jackson deserialize json (from application.yml) string :
"OperatorEquals":{"Metrics":3}
I got the JsonNode root, it has 1 key: operatorEquals
How to make Jackson deserialize with the key as original case?
https://stackoverflow.com/questions/30205006/why-does-jackson-2-not-recognize-the-first-capital-letter-if-the-leading-camel-c
Says Jackson would make first 2 letters lowercase.
Is there a way in micronaut (version 3 or 4) to configure that behavior?
I read https://stackoverflow.com/questions/53195071/how-to-configure-jackson-to-use-snake-case-in-micronaut
If I configure naming strategy in application yml file:
jackson:
property-naming-strategy: SNAKE_CASE
But the test will fail with
Message: Failed to inject value for parameter [propertyNamingStrategy] of method [setPropertyNamingStrategy] of class: io.micronaut.jackson.JacksonConfiguration
Any suggestions?
Beta Was this translation helpful? Give feedback.
All reactions