Skip to content

Tag: spring-boot

Error parsing JSON (MismatchedInputException)

I’m having problems parsing JSON, this is the error: And I know why it is happening I just don’t know how to fix it. This JSON works: This one does not: The problem seems to be the { character in front of the info field because with [ works. So this is the method I’m using to parse the JSON:

How to use @ConfigurationProperties with Records?

Java 16 introduced Records, which help to reduce boilerplate code when writing classes that carry immutable data. When I try to use a Record as @ConfigurationProperties bean as follows I get the following error message: How can I use Records as @ConfigurationProperties? Answer Answering my own question. The a…