

def dump(self, document, indent=False, **kwargs):
    '\n        Takes a document and returns a bytestring.\n        '
    if indent:
        options = {
            'ensure_ascii': False,
            'indent': 4,
            'separators': VERBOSE_SEPARATORS,
        }
    else:
        options = {
            'ensure_ascii': False,
            'indent': None,
            'separators': COMPACT_SEPARATORS,
        }
    data = _document_to_primative(document)
    return force_bytes(json.dumps(data, **options))

dataset/ETHPy150Open core-api/python-client/coreapi/codecs/corejson.py CoreJSONCodec.dump/original