Implement enter key to generate JSON