On Jul 24, 2014, at 11:18 AM, Rohit Harchandani <[email protected]> wrote:

> Hi,
> This is the code that I am using to parse the JSON string.
> 
> var recData = JSON.parse(recDataString, function (key, value) {
>     if (value && (typeof value === 'string') && value.indexOf("function") === 
> 0) {
>         var jsFunc = new Function('return ' + value)();
>         return jsFunc;
>     }
>     return value;
> });
>       
> console.log( "Type: " + typeof recData["runFunction"] )
> 
> runFunction in the json is a function which is something like this:
> 
> function() {
>     require("fs");


Could you show us sample json input? It's much easier for us to help you if you 
give us enough information to easily reproduce the problem on our own systems.



-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/DD2646F6-CBFF-475B-A82D-23276268AD72%40ryandesign.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to