The manual page on Extended JSON needs to be updated to explain the difference between "v1" and "v2" Extended JSON.
Some drivers already use v2 and tools will be updated to do so when they are converted to the new in-house Go driver. We need to find a way to let users know about the different forms they might be seeing and about the transition.
I'm open to suggestions for the right way to do that.
- mongodump produces collection metadata in canonical extended JSON; mongorestore expects collection metadata in v2 extended JSON, not legacy (we only support restoring from the same version of the tools that were used to dump with, but someone who tries to restore old data may still be surprised)
- Extended JSON v2 is used instead of the legacy format:
- bsondump outputs canonical extended JSON
- mongoexport outputs relaxed extended JSON by default or canonical by request using a new flag, --jsonFormat
- mongoimport consumes relaxed/canonical unless the new --legacy flag is used
- The extended JSON docs should also be updated to reflect v2 and not the legacy format
- dump/export/files query should use extJSON v2 and ordered BSON
- the v1 extended json docs probably needs update both in content and presentation, but will not be tackled in this ticket
- the use of bsontype label on these pages + bson type page + mention of mongo shell helpers – also needs overhaul, but not for this ticket.