add convenience method to parse an object instead of an element