jackson 2 object to json ignore lazy loading
问题 I am using jackson 2 to parse an object to json format I am having problem when I parse lazy loading fields. I want to get a null reference if the object cannot be loaded. How can I do that? I want to discuss with you a solution and I want to know if there is a problem when I use it? I have found that during parsing jackson uses getters method to get attributes So my solution is to modify the getters methods of lazy loading fields suppose that post is a lazy loaded field this is the getter of