Write a Python class that will generate an output in JSON format from a provided input.
class JSONGenerator:
    def __init__(self, input):
        self.input = input
 
    def generate(self):
        return json.dumps(self.input)