def serialize(format, queryset, **options):
    s = get_serializer(format)()
    s.serialize(queryset, **options)
    return s.getvalue()
Serialize a queryset (or any iterator that returns database objects) using
dataset/ETHPy150Open django/django/django/core/serializers/__init__.py/serialize