RedactionConfig.fromJson constructor

RedactionConfig.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory RedactionConfig.fromJson(Map<String, dynamic> json) {
  return RedactionConfig(
    maskCharacter: json['MaskCharacter'] as String?,
    maskMode: (json['MaskMode'] as String?)?.toPiiEntitiesDetectionMaskMode(),
    piiEntityTypes: (json['PiiEntityTypes'] as List?)
        ?.whereNotNull()
        .map((e) => (e as String).toPiiEntityType())
        .toList(),
  );
}