[COMPASS-4521] Invalid JSON when exporting a collection Created: 30/Nov/20  Updated: 27/Oct/23  Resolved: 02/Dec/20

Status: Closed
Project: Compass
Component/s: Collection, Compass
Affects Version/s: 1.19.12
Fix Version/s: 1.21.0

Type: Bug Priority: Minor - P4
Reporter: Jan Guardian Assignee: Unassigned
Resolution: Gone away Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 10 Home 20H2 Build 19042.630


Attachments: PNG File Screenshot.png    
Documentation Changes: Not Needed

 Description   

Problem Description

Exporting a collection in JSON produces an invalid .json file: documents are not separated with commas and are not in an array

Steps to Reproduce

  1. Connect to any non-empty database
  2. Open any non-empty collection
  3. Click 'Collection/Export Collection' in the top menu
  4. Select 'JSON' as the 'Output File Type'
  5. Click 'Browse' and specify any name of the file matching the *.json pattern
  6. Click 'Export'
  7. Open an exported file

Expected Results

A valid JSON file is produced: documents are in an array and are separated with commas

Actual Results

An invalid JSON file is produced: documents are not in an array and are not separated with commas



 Comments   
Comment by Massimiliano Marcon [ 02/Dec/20 ]

guardian.jan@gmail.com that was the expected behavior before Compass 1.21: collections were exported in JSON Lines format (https://jsonlines.org/) because it's faster to process.

However, in Compass 1.21 we changed the implementation and now Compass can generate and import valid JSON arrays. I suggest you update to the latest stable version, which is 1.23 now and should be 1.24 later this week.

Generated at Wed Feb 07 22:36:39 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.