abp icon indicating copy to clipboard operation
abp copied to clipboard

ignore null attributes in api response

Open erojasd opened this issue 6 years ago • 1 comments

Hello

It is possible to configure a dto object so that the api does not send null attributes in the response.

erojasd avatar May 08 '20 19:05 erojasd

Hi @erojasd,

You cannot configure a dynamic DTO to suppress the null properties. It is not related with ABP.

Here is my suggestion:

You can return a json string by change some options in JsonSerializerSettings. Please look at: https://www.newtonsoft.com/json/help/html/NullValueHandlingIgnore.htm

cotur avatar May 08 '20 20:05 cotur