add missing import of toJSON + update documentation