fromJSON static method

CareTeamMember fromJSON(
  1. Map<String, dynamic> data
)

Implementation

static CareTeamMember fromJSON(Map<String, dynamic> data) {
	if (data["kotlinType"] == null) {
		throw ArgumentError('Missing discriminator: kotlinType');
	}
	String discriminator = data["kotlinType"];
	switch (discriminator) {
		case "com.icure.cardinal.sdk.model.embed.EncryptedCareTeamMember":
			return EncryptedCareTeamMember.fromJSON(data);
		case "com.icure.cardinal.sdk.model.embed.DecryptedCareTeamMember":
			return DecryptedCareTeamMember.fromJSON(data);
		default:
			throw ArgumentError('Invalid subclass $discriminator');
	}
}