'I want ignored field by @jsonignore to be null while serialization

I have one to many relationship with company and user. I am using @jsonignore for avoiding infinite recursion but one property is ignored during serialization. Instead of ignoring, I want that property as null in the json. How can I do that?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source