Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-406

mongoexport cannot export documents that contain javascript functions

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.3.1
    • Affects Version/s: None
    • Component/s: Tools
    • None
    • Environment:
      Running on Ubuntu Desktop 9.10 64bit - running head

      In the shell
      ----------------------------

      > use crash
      switched to db crash
      > obj = {func : function()

      { print("hello");}

      }
      { "func" : function ()

      { print("hello"); }

      }
      > db.func.save(obj)

      Using mongoexport
      ------------------------------
      :~/$ /opt/mongo/bin/mongoexport -d crash -c func
      connected to: 127.0.0.1
      assertion: massert:Cannot create a properly formatted JSON string with element: func: function () {
      print("hello");
      } of type: 13

            Assignee:
            eliot Eliot Horowitz (Inactive)
            Reporter:
            guyvdb Guy van den Berg
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: