Add feature to export in JSON format.