Hi Sergey,
There are a few ways to customize aspects of JSON encoding. Here is one that may be applicable in your case. Since Agrest 3.3 there is an injectable ValueEncoders service that maintains a collection of common property encoders per value type as well as a generic fallback encoder, and ValueEncodersProvider that builds an instance of that class. You can create a provider subclass, and bind it via a custiom Module:
AgBuilder.builder(runtime).module(binder -> {
binder.bind(ValueEncoders.class).toProvider(MyValueEncodersProvider.class);
})
.build();
In MyValueEncodersProvider you may override "createValueEncoders" method to decorate all the preloaded encoders to skip null values.
Andrus