- 
    Type:Bug 
- 
    Resolution: Works as Designed
- 
    Priority:Minor - P4 
- 
    None
- 
    Affects Version/s: 3.4.23
- 
    Component/s: mongoexport
- 
    Environment:Server (mongo) enviroment:
 Oracle Linux Server 7.7
 SHELL=/bin/ksh
 Kernel: Linux 3.10.0-1062.18.1.el7.x86_64 x86_64
 
 MongoDB shell version v3.4.23
 git version: 324017ede1dbb1c9554dd2dceb15f8da3c59d0e8
 OpenSSL version: OpenSSL 1.0.1e-fips 11 Feb 2013
 allocator: tcmalloc
 modules: none
 build environment:
 distmod: rhel70
 distarch: x86_64
 target_arch: x86_64
 
 Local environment:
 Python 3.8.1
 Python shell: /usr/local/bin/fish
 OS: macOS Catalina 10.15.4Server (mongo) enviroment: Oracle Linux Server 7.7 SHELL=/bin/ksh Kernel: Linux 3.10.0-1062.18.1.el7.x86_64 x86_64 MongoDB shell version v3.4.23 git version: 324017ede1dbb1c9554dd2dceb15f8da3c59d0e8 OpenSSL version: OpenSSL 1.0.1e-fips 11 Feb 2013 allocator: tcmalloc modules: none build environment: distmod: rhel70 distarch: x86_64 target_arch: x86_64 Local environment: Python 3.8.1 Python shell: /usr/local/bin/fish OS: macOS Catalina 10.15.4
The file size is 1413MB. There are many entries in the database being exported that don't have comma separators.
The data I'm exporting is my server's StackStorm workflow execution with the following command:
'mongoexport -d st2 -c workflow_execution_d_b -o 05-03-2020_workflows_export.json --pretty'
I found the issue when attempting to parse the JSON with Python.
 def parse(file_name):
  with open(file_name, 'r') as file:
    json_data = json.load(file)
  print(json.dumps(json_data))
parse('05-03-2020_actions_export.json')
Which gives the error:
Traceback (most recent call last):
 File "st2_utils/json_parser.py", line 10, in <module>
 parse('05-03-2020_actions_export.json')
 File "st2_utils/json_parser.py", line 6, in parse
 json_data = json.load(file)
 File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/json/_init_.py", line 293, in load
 return loads(fp.read(),
 File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/json/_init_.py", line 357, in loads
 return _default_decoder.decode(s)
 File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/json/decoder.py", line 340, in decode
 raise JSONDecodeError("Extra data", s, end)
 json.decoder.JSONDecodeError: Extra data: line 9130 column 2 (char 301892)