Close modal upon parsing valid JSON.