Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8816749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:41:22+00:00 2026-06-14T04:41:22+00:00

How do I import a NumberLong into MongoDB using mongoimport ? Unfortunately, entries like

  • 0

How do I import a NumberLong into MongoDB using mongoimport?

Unfortunately, entries like these in a json file cause an error:

{"_id": NumberLong(123)}
{"_id": NumberLong("123")}

Result:

Mon Nov 12 14:41:46 Assertion: 10340:Failure parsing JSON string near: "_id": Num
0xaf6b21 0xabe459 0xabe5dc 0x7b93ad 0x56160d 0x5630f4 0xabb412 0x5546bc 0x7f961b79776d 0x554549 
 mongoimport(_ZN5mongo15printStackTraceERSo+0x21) [0xaf6b21]
 mongoimport(_ZN5mongo11msgassertedEiPKc+0x99) [0xabe459]
 mongoimport() [0xabe5dc]
 mongoimport(_ZN5mongo8fromjsonEPKcPi+0x56d) [0x7b93ad]
 mongoimport(_ZN6Import8parseRowEPSiRN5mongo7BSONObjERi+0xa2d) [0x56160d]
 mongoimport(_ZN6Import3runEv+0x1314) [0x5630f4]
 mongoimport(_ZN5mongo4Tool4mainEiPPc+0x1712) [0xabb412]
 mongoimport(main+0x2c) [0x5546bc]
 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7f961b79776d]
 mongoimport(__gxx_personality_v0+0x419) [0x554549]
Mon Nov 12 14:41:46 exception:BSON representation of supplied JSON is too large: Failure parsing JSON string near: "_id": Num
Mon Nov 12 14:41:46 
Mon Nov 12 14:41:46 imported 0 objects
Mon Nov 12 14:41:46 ERROR: encountered 1 error
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T04:41:23+00:00Added an answer on June 14, 2026 at 4:41 am

    NumberLong is a Javascript Shell output only thing, to show that MongoDB has stored a 64bit integer. For importing, you can just use:

    { "_id": 123 }

    And it will automatically either use a normal number (int32) or if it is too large, use a NumberLong (int64). For operations in MongoDB, it doesn’t matter whether it is stored as an in32 or an int64.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

#import Mutation.h //my class @implementation NTAppDelegate using app delegate as controller @synthesize window =
I am trying to obtain a variable from a different file type and import
import datetime, json x = {'alpha': {datetime.date.today(): 'abcde'}} print json.dumps(x) The above code fails
I'm working on a file management system and would like to include an automated
import org.json.simple.JSONArray; import org.json.simple.JSONAware; import org.json.simple.JSONObject; import org.json.simple.JSONValue; public class JsonTest implements JSONAware {
import http.client, urllib.request, urllib.parse, urllib.error def translate(IN, OUT, text): text = urllib.parse.quote(text) conn =
import json import simplejson import urllib2 data = urllib2.urlopen('www.example.com/url/where/i/get/json/data').read() j = j = simplejson.loads(data)
import org.apache.commons.io.FileUtils; Friends Please tell me how to import this file in android. MY
import subprocess subprocess.Popen(['C:\Program Files\Nuke6.1v3\\Nuke6.1.exe', '-t', 'C:\Users\user\Desktop\\server.py' I am currently using this to call server.py,
import java.io.BufferedReader; import java.util.Collections; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.util.ArrayList;

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.