

@classmethod
def with_json(cls, jsonobj):
    ' Initialize an element from a JSON dictionary or array.\n        \n        If the JSON dictionary has a "resourceType" entry and the specified\n        resource type is not the receiving classes type, uses\n        `FHIRElementFactory` to return a correct class instance.\n        \n        :param jsonobj: A dict or list of dicts to instantiate from\n        :returns: An instance or a list of instances created from JSON data\n        '
    if isinstance(jsonobj, dict):
        return cls._with_json_dict(jsonobj)
    arr = []
    for jsondict in jsonobj:
        arr.append(cls._with_json_dict(jsondict))
    return arr

dataset/ETHPy150Open smart-on-fhir/client-py/fhirclient/models/fhirabstractbase.py FHIRAbstractBase.with_json/original