You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey @MuminovicAnel.
I think this is a use case that should be handled in the userland, not in the library itself.
IMO the best way of dealing with this would be to create a BaseDTO class that extends from the SimpleDTO or ValidatedDTO one and on it you can add two new methods: toNonNullableJson and toNonNullableArray then in your DTOs, extend from your own BaseDTO class instead.
A second approach is to create a Trait and add these two methods in the Trait and in the DTOs you need that you can add the trait to it.
Hello!
Your package is really great and convenient for the use case of our team. :)
I wanted to know if there as a possiblity to add the option to get data without null properties from the DTO ?
Because I need to overwrite the toJson or toArray methods like this in every DTO.
Thanks!
The text was updated successfully, but these errors were encountered: