ExtendedJSON JSON with support for classes. TODO Refactor the code to minimize repetition. Add replacer and spacer to the stringify function.