@classmethod<EOL><INDENT>def _object_to_dict(cls, obj, fields=None):<DEDENT>
default_dict = obj.to_dict()<EOL>if fields is None or "<STR_LIT>" in fields:<EOL><INDENT>return default_dict<EOL><DEDENT>known_fields = list(default_dict.keys())<EOL>ordered_dict = OrderedDict()<EOL>for field in fields:<EOL><INDENT>if field in known_fields:<EOL><INDENT>ordered_dict[field] = default_dict[field]<EOL><DEDENT><DEDENT>return ordered_dict<EOL>
Get object dictionnary with filtered fields