REST api not include null value

Hello,

Null values are removed in the REST API. I tried different methods but none of them added null values. For example:

@Configuration
public class JacksonConfig {

    @Bean
    public ObjectMapper objectMapper() {
        ObjectMapper objectMapper = new ObjectMapper();
        objectMapper.configure(SerializationFeature.WRITE_NULL_MAP_VALUES, true);
        objectMapper.setSerializationInclusion(JsonInclude.Include.ALWAYS);
        return objectMapper;
    }
}

What to do to add a null value?

Thanks

Hello,
Thank you for contacting Jmix support.
Here is the description regarding null values.

@s.markevich Is there any way to make this a global configuration? Because it is necessary to add returnNulls when making a request to the API. 200 times for 200 api :face_with_spiral_eyes:

Unfortunately, there is no way to set it via configuration. But you can try to extend the rest controller and set the required values there.

Ok, Thanks @s.markevich