Add polymorphic type handling for jackson.