admin管理员组

文章数量:1122846

When sending POST requests with a json body to my Micronaut API it is using Jackson's ObjectMapper to deserialize the json to the DTO.

From what I understood, when excepting a String field, it is trying to parse the next token as a String, and if it fails it converts it to a String anyway. This leads to Numbers and Booleans being converted to Strings.

Is there a way to prevent this? I looked at the JacksonConfiguration and didn't find anything that satisfies this requirement.

I looked at custom Serde implementation but couldn't find a way to validate the token as well.

本文标签: