Rename module.toJSON to module.serialize, as it doesn't actually return a JSON string. Some work still to do to remove reference to the old name.
Seems to match the current compiled README
Rename module.toJSON to module.serialize