def decode_struct_fields(self, ins, fields, obj):
for name, field_data_type in fields:<EOL><INDENT>if name in obj:<EOL><INDENT>try:<EOL><INDENT>v = self.json_compat_obj_decode_helper(field_data_type, obj[name])<EOL>setattr(ins, name, v)<EOL><DEDENT>except bv.ValidationError as e:<EOL><INDENT>e.add_parent(name)<EOL>raise<EOL><DEDENT><DEDENT>elif field_data_type.has_default():<EOL><INDENT>setattr(ins, name, field_data_type.get_default())<EOL><DEDENT><DEDENT>
Args:
    ins: An instance of the class representing the data type being decoded.
        The object will have its fields set.
    fields: A tuple of (field_name: str, field_validator: Validator)
    obj (dict): JSON-compatible dict that is being decoded.
    strict (bool): See :func:`json_compat_obj_decode`.
Returns:
    None: `ins` has its fields set based on the contents of `obj`.