Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-3436

Detect initial `[` and encourage (mandate?) --jsonArray.

    • Type: Icon: New Feature New Feature
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: mongoimport
    • None
    • 355

      Users with large backups may be unaware that their backups are saved as one giant JSON array. In this case mongoimport may try reading that entire array as a single JSON document (i.e., with a top-level array), which almost certainly will not be what the user wants and may cause memory-consumption problems besides.

      mongoimport should, if the first JSON character is `[` but the user did not pass the `--jsonArray` flag, show a warning to the effect of:

      $filename begins with `[`, but you didn’t pass --jsonArray. Did you mean to?

            Assignee:
            Unassigned Unassigned
            Reporter:
            felipe.gasper@mongodb.com Felipe Gasper
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: