Added JSON deserialization to the listen method