Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-9543

Docs for SERVER-10777: Allow JSON Parser to support additional fields when parsing DBRefs

    XMLWordPrintableJSON

Details

    Description

      Engineering Ticket Description:

      This works:

      $ echo '{ "_id" : { "$oid" : "5062d20310db79406d000059" }, "parent" : { "$ref" : "box", "$id" : { "$oid" : "5062d1d810db799135000005" } } }' | mongoimport -d test -c testcoll 
      connected to: 127.0.0.1
      Mon Sep 16 11:26:01.811 imported 1 objects

      This does not:

      $ echo '{ "_id" : { "$oid" : "5062d20310db79406d000059" }, "parent" : { "$ref" : "box", "$id" : { "$oid" : "5062d1d810db799135000005" }, "_doctrine_class_name" : "Box" } }' | mongoimport -d test -c testcoll 
      connected to: 127.0.0.1
      Mon Sep 16 11:26:29.705 exception:BSON representation of supplied JSON is too large: code FailedToParse: FailedToParse: Expecting '}' or ',': offset:127
      Mon Sep 16 11:26:29.705 
      Mon Sep 16 11:26:29.705 check 0 0
      Mon Sep 16 11:26:29.705 imported 0 objects
      Mon Sep 16 11:26:29.705 ERROR: encountered 1 error(s)

      Notice the extra "_doctrine_class_name" field in the DBRef.
      If I use the MongoDB 2.2 mongoimport, then it works.

      There's been an issue with same summary for 1.3, but with different content.

      Attachments

        Issue Links

          Activity

            People

              kay.kim@mongodb.com Kay Kim (Inactive)
              emily.hall Emily Hall
              Jess Mokrzecki Jess Mokrzecki
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                47 weeks, 5 days ago