def serialize(self, format='json-ld', **kwargs):
    "Serializes the document's graph to a destination.\n        (Follows same arguments as rdflib.Graph().serialize())"
    if (format == 'json-ld'):
        if ('context' not in kwargs):
            kwargs['context'] = self._json_ld_context()
        if ('auto_compact' not in kwargs):
            kwargs['auto_compact'] = True
    return self.graph.serialize(format=format, **kwargs)
Serializes the document's graph to a destination.
(Follows same arguments as rdflib.Graph().serialize())
def serialize(self, format='json-ld', **kwargs):
    "Serializes the document's graph to a destination.\n        (Follows same arguments as rdflib.Graph().serialize())"
    if (format == 'json-ld'):
        if ('context' not in kwargs):
            kwargs['context'] = self._json_ld_context()
        if ('auto_compact' not in kwargs):
            kwargs['auto_compact'] = True
    return self.graph.serialize(format=format, **kwargs)