Conversions between JSON and polymorphic Java Objects