ThuneGrill
ThuneGrill

Reputation: 71

Jackson serialise fields as uppercase?

My object gets serialised as {name="nyname" ....}, however, I require all keys to be start with uppercase, ie. {Name="myname",.....} how can I do that with Jackson ?

Upvotes: 1

Views: 1948

Answers (1)

bhilstrom
bhilstrom

Reputation: 1541

I had the same issue and posted about it earlier. I solved it here: How can I enable Pascal casing by default when using Jackson JSON in Spring MVC?

If you're not using Spring, the answer would be similar. You'll still need a custom (de)serializer, and you'd just need to wire it in to your program in the manner you choose.

Upvotes: 2

Related Questions