[SERVER-24562] Enhance shell to output strict json Created: 14/Jun/16  Updated: 06/Dec/22  Resolved: 03/Dec/21

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: hui DENG Assignee: Backlog - Server Tooling and Methods (STM) (Inactive)
Resolution: Won't Fix Votes: 0
Labels: move-stm
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-19171 Shell does not always use extended JS... Closed
related to SERVER-13209 Ensure extended shell JSON ouput form... Closed
Assigned Teams:
Server Tooling & Methods
Participants:

 Description   

mongodb outputs extended json in Shell, while outputs strict json in other tools (mongoexport,api etc.), there is no interoperability among these channels, no help functions or switch options.
general shell output is very important for re-edit the content. but extended json can't be parsed by JSON.parse() in JAVA driver, it's also can't be validated throught other json editors, can't be understanded by other json applications. you almost don't know which case can be benefited from extended json format. just for human kind looks it more concisely?
we i prepare test case which need data from mongodb, I must revise every document shown in shell, otherwise I need connect to remove machine, using dbexport one line from huge database, and ftp the file back to my workspace? all these additional works could have been done by only one copy-paste.



 Comments   
Comment by Brooke Miller [ 03/Dec/21 ]

We've deprecated the mongo shell in favor of the new mongosh. Unfortunately, we aren't able to pursue improvements to the deprecated shell except in extreme cases, such as critical security fixes. Please start making use of mongosh and let us know if it works for you in this case.

Comment by Ramon Fernandez Marina [ 14/Jun/16 ]

Thanks for your report truetime, I'm repurposing this ticket as an improvement request for the shell to output strict json so shell output can used in other contexts. Can you please confirm that such an enhancement would meet your needs?

Thanks,
Ramón.

Generated at Thu Feb 08 04:06:42 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.