Refactor serializer to add annotation introspector which automatically serializes primitives and Serializable objects.