Implemented export to JSON