-2

i have a task in which i have a dto class which consist of 10 fields now in which i set vallue for only 5 fields now while sending it in json format i need to send only the filed wose values are set using setter regardless of its value(i.e it can set to null also), i need need to send these fiels in serilization result should be i need to send fileds of dto class that are set using setter method and exclude all other fileds in json serilization. i need to a json in which only the fields whose value are set using setter method are present

Stevil
  • 1
  • 1
    Please show your own research on this issue, your own attempt, if only to help make your question more specific and less likely to be closed. Please review the [ask] link for more on how to improve this and your future questions. – Hovercraft Full Of Eels Aug 08 '23 at 10:54

0 Answers0