How to override isEmpty method of JsonSerializer for specific class without overriding serialize method?

前端 未结 2 1341
一向
一向 2020-12-19 19:46

I want to add custom behaviour for isEmpty method.

When I extends from JsonSerializer

I should override

2条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-19 20:45

    In the end you anyway have to have an implementation for the serialize method, as it is abstract. You couldn't instantiate your class if at least one method is left abstract

提交回复
热议问题