fix #250; respect type attribute for array and object fields
fix #216; when type overridden to "hidden", we still extract field value as a boolean