This demonstrates how to write functions out to JSON.
writeJSON.js will write out "data.json" which will take a standard JavaScript object and serialize the functions to strings.
node src/writeJSON.js
readJSON.js will read the "data.json" which and will deserialize the functions back into the original form.
node src/readJSON.js