import json


def json_to_model(text, model_class):
    """
    Deserialize json string into model instances:
    - text: json source as a string
    - model_class: the model class
    Return: a model instance
    """
    fields = json.loads(text)
    return model_class.objects.create(**fields)