(self, objs)
| 58 | return self._serialize_common(obj) |
| 59 | |
| 60 | def serialize_many(self, objs): |
| 61 | collected = [] |
| 62 | for obj in ensure_list(objs): |
| 63 | obj = self._to_dict(obj) |
| 64 | if obj is not None: |
| 65 | self.collect(obj) |
| 66 | collected.append(obj) |
| 67 | resolver.resolve(request) |
| 68 | serialized = [] |
| 69 | for obj in collected: |
| 70 | obj = self._serialize_common(obj) |
| 71 | if obj is not None: |
| 72 | serialized.append(obj) |
| 73 | return serialized |
| 74 | |
| 75 | def _to_dict(self, obj): |
| 76 | if hasattr(obj, "to_dict"): |