[SERVER-1152] mongoimport not creating object for valid JSON file input Created: 25/May/10  Updated: 12/Jul/16  Resolved: 03/Jun/10

Status: Closed
Project: Core Server
Component/s: Tools
Affects Version/s: 1.4.1, 1.5.1
Fix Version/s: 1.5.3

Type: Bug Priority: Major - P3
Reporter: Fitz Agard Assignee: Mathias Stearn
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File input.json    
Participants:

 Description   

mongoimport --verbose -d test -c ctest --file ~/input.json

connected to: 127.0.0.1
Tue May 25 11:30:00 ns: test.ctest
Tue May 25 11:30:00 filesize: 46
Tue May 25 11:30:00 got line:

{ "firstname" : "fitz", "lastname" : "agard" }

imported 0 objects

I only tested this on 1.5.1 and 1.4.1



 Comments   
Comment by auto [ 03/Jun/10 ]

Author:

{'login': 'RedBeard0531', 'name': 'Mathias Stearn', 'email': 'mathias@10gen.com'}

Message: Make mongoimport work w/o final EOL. SERVER-1152
http://github.com/mongodb/mongo/commit/4cd8bf8291b0c6a195a62248cbf8715d72f29934

Comment by Fitz Agard [ 25/May/10 ]

Thanks for the update. Adding the trailing newline worked.

Comment by Mathias Stearn [ 25/May/10 ]

The issue is that the file doesn't have a trailing newline. I'll fix mongoimport so it will work without one, but for now, adding one can fix it on your end.

Generated at Thu Feb 08 02:56:13 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.