Feature/issue 2

Fix for issue #2, adds discriminator and subtypes to support polymorphic types using Jackson annotations.