[SERVER-406] mongoexport cannot export documents that contain javascript functions Created: 04/Nov/09  Updated: 12/Jul/16  Resolved: 16/Jan/10

Status: Closed
Project: Core Server
Component/s: Tools
Affects Version/s: None
Fix Version/s: 1.3.1

Type: Bug Priority: Minor - P4
Reporter: Guy van den Berg Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Running on Ubuntu Desktop 9.10 64bit - running head


Participants:

 Description   

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



 Comments   
Comment by auto [ 16/Jan/10 ]

Author:

{'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}

Message: jsonString handles Code SERVER-406
http://github.com/mongodb/mongo/commit/cd7148702bd90ab0b300e1f43b5eba5e173c895c

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