Making the call to JSON in the main code