add support for parsing as object of a class