title: Mongoimport of JSON file
body: <p>I have a JSON file consisting of about 2000 records.  Each record which will correspond to a document in the mongo database is formatted as follows:</p>
  <pre><code>{jobID:&quot;2597401&quot;,
  account:&quot;XXXXX&quot;,
  user:&quot;YYYYY&quot;,
  pkgT:{&quot;pgi/7.2-5&quot;:{libA:[&quot;libpgc.so&quot;],flavor:[&quot;default&quot;]}},     
  startEpoch:&quot;1338497979&quot;,
  runTime:&quot;1022&quot;,
  execType:&quot;user:binary&quot;,
  exec:&quot;/share/home/01482/XXXXX/appker/ranger/NPB3.3.1/NPB3.3-MPI/bin/ft.D.64&quot;,
  numNodes:&quot;4&quot;,
  sha1:&quot;5a79879235aa31b6a46e73b43879428e2a175db5&quot;,
  execEpoch:1336766742,
  execModify: new Date(&quot;Fri May 11 15:05:42 2012&quot;),
  startTime: new Date(&quot;Thu May 31 15:59:39 2012&quot;),
  numCores:&quot;64&quot;,
  sizeT:{bss:&quot;1881400168&quot;,text:&quot;239574&quot;,data:&quot;22504&quot;}},
  </code></pre>
  <p>Each record is on a single line in the JSON file, and the only line breaks are at the end of every record.  Therefore, each line in the document starts with &quot;{jobID:&quot;...  I am trying to import these into a mongo database using the following command:</p>
  <pre><code>mongoimport --db dbName --collection collectionName --file fileName.json
  </code></pre>
  <p>However, I get the following error:</p>
  <pre><code>Sat Mar  2 01:26:12 Assertion: 10340:Failure parsing JSON string near: ,execModif
  0x10059f12b 0x100562d5c 0x100562e9c 0x10025eb98 0x10000e643 0x100010b60 0x10055c4cc 0x1000014b7    
  0x100001454 
   0   mongoimport                         0x000000010059f12b _ZN5mongo15printStackTraceERSo + 43
   1   mongoimport                         0x0000000100562d5c _ZN5mongo11msgassertedEiPKc + 204
   2   mongoimport                         0x0000000100562e9c _ZN5mongo11msgassertedEiRKSs + 12
   3   mongoimport                         0x000000010025eb98 _ZN5mongo8fromjsonEPKcPi + 1576
   4   mongoimport                         0x000000010000e643          
                                           _ZN6Import8parseRowEPSiRN5mongo7BSONObjERi + 2739
   5   mongoimport                         0x0000000100010b60 _ZN6Import3runEv + 7376
   6   mongoimport                         0x000000010055c4cc _ZN5mongo4Tool4mainEiPPc + 5436
   7   mongoimport                         0x00000001000014b7 main + 55
   8   mongoimport                         0x0000000100001454 start + 52
  Sat Mar  2 01:26:12 exception:BSON representation of supplied JSON is too large: Failure parsing    
      JSON string near: ,execModif
  Sat Mar  2 01:26:12 
  Sat Mar  2 01:26:12 imported 0 objects
  Sat Mar  2 01:26:12 ERROR: encountered 1941 errors
  </code></pre>
  <p>I do not know what the problem is. Can someone recommend a solution?</p>