# Field.fromJson constructor

Field.fromJson(

1. Map<String, dynamic> json

)

## Implementation

    factory Field.fromJson(Map<String, dynamic> json) => Field(
          type: FieldType.fromJson(json["type"] as Map<String, dynamic>),
          value: (json["value"] != null
              ? OcrResult.fromJson(json["value"] as Map<String, dynamic>)
              : null),
          confidenceWeight: json.containsKey("confidenceWeight")
              ? (json["confidenceWeight"] as num).toDouble()
              : 1.0,
          image: json.containsKey("image")
              ? (json["image"] != null
                  ? ImageRef.fromJson(json["image"] as Map<String, dynamic>)
                  : null)
              : null,
          polygonInRoot: (json["polygonInRoot"] as List<dynamic>)
              .map((it) => Point<double>(
                  ((it as Map<String, dynamic>)["x"] as num).toDouble(),
                  ((it)["y"] as num).toDouble()))
              .toList(),
          validationStatus: json.containsKey("validationStatus")
              ? FieldValidationStatus.values
                  .byName(json["validationStatus"] as String)
              : FieldValidationStatus.NONE,
          parsedData: json.containsKey("parsedData")
              ? (json["parsedData"] as List<dynamic>)
                  .map((it) =>
                      FieldParsedData.fromJson(it as Map<String, dynamic>))
                  .toList()
              : [],
        );