Serialize JavaScript to a superset of JSON that includes regular expressions and functions.