How to extract json from .export file?

Hi, I am a very beginner to the orientdb and recently exported my database as .export file and used python below to extract the data,

import json

with open(‘D:/ffboDataset/connectivity.export’) as json_file:

data = json.load(json_file)

but I got the error like the followings:

Traceback (most recent call last):
File “d:/ffboDataset/dataExtractor.py”, line 4, in
data = json.load(json_file)
File “C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.1776.0_x64__qbz5n2kfra8p0\lib\json_init_.py”, line 296, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File “C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.1776.0_x64__qbz5n2kfra8p0\lib\json_init_.py”, line 348, in loads
return _default_decoder.decode(s)
File “C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.1776.0_x64__qbz5n2kfra8p0\lib\json\decoder.py”, line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.1776.0_x64__qbz5n2kfra8p0\lib\json\decoder.py”, line 355, in raw_decode
raise JSONDecodeError(“Expecting value”, s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 67790 (char 67789)

Can anyone help me with this please?

Hi @Moore

By default, OrientDB exports json and compresses it with gz, you probably just have to extract it

Thanks

Luigi

Hi thank you for your help! I tried the following code in python to extract the exported orientdb .export file but it does not work:

import json
with open(‘D:/ffboDataset/connectivity.export’) as json_file:
data = json.load(json_file)