Modified code to use the new JSON format, and made it able to parse either single or multiple inputs at once