# DocumentQualityAnalyzerConfiguration.fromJson constructor

DocumentQualityAnalyzerConfiguration.fromJson(

1. Map<String, dynamic> json

)

## Implementation

    factory DocumentQualityAnalyzerConfiguration.fromJson(
            Map<String, dynamic> json) =>
        DocumentQualityAnalyzerConfiguration(
          qualityThresholds: json.containsKey("qualityThresholds")
              ? (json["qualityThresholds"] as List<dynamic>)
                  .map((it) => DocumentQualityThreshold.fromJson(
                      it as Map<String, dynamic>))
                  .toList()
              : [
                  DocumentQualityThreshold(symbolQuality: 0.5, symbolRatio: 0.5),
                  DocumentQualityThreshold(symbolQuality: 0.7, symbolRatio: 0.3),
                  DocumentQualityThreshold(symbolQuality: 0.85, symbolRatio: 0.3),
                  DocumentQualityThreshold(symbolQuality: 0.9, symbolRatio: 0.1)
                ],
          qualityIndices: json.containsKey("qualityIndices")
              ? (json["qualityIndices"] as List<dynamic>)
                  .map((it) => DocumentQuality.values.byName(it as String))
                  .toList()
              : [
                  DocumentQuality.VERY_POOR,
                  DocumentQuality.POOR,
                  DocumentQuality.REASONABLE,
                  DocumentQuality.GOOD,
                  DocumentQuality.EXCELLENT
                ],
          detectOrientation: json.containsKey("detectOrientation")
              ? (json["detectOrientation"] as bool)
              : false,
          inspectSmallText: json.containsKey("inspectSmallText")
              ? (json["inspectSmallText"] as bool)
              : false,
          maxImageSize: json.containsKey("maxImageSize")
              ? (json["maxImageSize"] as int)
              : 2000,
          minEstimatedNumberOfSymbolsForDocument:
              json.containsKey("minEstimatedNumberOfSymbolsForDocument")
                  ? (json["minEstimatedNumberOfSymbolsForDocument"] as int)
                  : 20,
          minProcessedFraction: json.containsKey("minProcessedFraction")
              ? (json["minProcessedFraction"] as num).toDouble()
              : 0.0,
          maxProcessedFraction: json.containsKey("maxProcessedFraction")
              ? (json["maxProcessedFraction"] as num).toDouble()
              : 0.5,
          earlyStopIfNSymbolsFound: json.containsKey("earlyStopIfNSymbolsFound")
              ? (json["earlyStopIfNSymbolsFound"] as int)
              : 100,
          tileSize:
              json.containsKey("tileSize") ? (json["tileSize"] as int) : 300,
          returnQualityHeatmap: json.containsKey("returnQualityHeatmap")
              ? (json["returnQualityHeatmap"] as bool)
              : false,
        );