i have a rest api, i get the data using DAO, mapping it from class to another DTO class, if no data present in database, instead of returning null like this
{
"tes":null,
"tez": null,
"example": null
}
i want to return like this:
{
"tes":"",
"tez": "",
"example": ""
}
i have more than 100 field. so i think its not good to set value in setter getter in all field. how to do this is simple way?