Ok, there is a fundamental problem with this approach (suppressing output from custom collection serializer): serializer MUST write a JSON value; otherwise resulting JSON may be invalid.
Consider case where collection is a value of property – JSON property name is output, and there has to be some value.
It may be 'null', empty Strings, empty JSON Array, but can not be missing.
So this would not work for intended use. A variation might work that used method null-suppression, however: using
should suppress output. But if (and only if!) a concrete type was used: this because abstract types can not be instantiated, so there can not be a default value (default is defined as instance constructed using no-args constructor).
I did test override functionality itself, and as far as I can see, it works (see unit test src/test/org/codehaus/jackson/map/ser/TestCustomSerializers.java in trunk).
This is also problematic for global feature. New inclusion enum value might work from user perspective; challenge is in actually implementing it.