# toJson method

Map<String, dynamic> toJson({

1. ToJsonConfiguration? config,

})

## Implementation

    Map<String, dynamic> toJson({ToJsonConfiguration? config}) {
      config = config ?? ToJsonConfiguration();
      Map<String, dynamic> obj = <String, dynamic>{};
      obj["type"] = type.toJson(config: config);
      obj["value"] = (value != null ? value!.toJson(config: config) : null);
      obj["confidenceWeight"] = confidenceWeight;
      if (config.serializeImages) {
        obj["image"] = (image != null ? image!.toJson() : null);
      }
      obj["polygonInRoot"] =
          polygonInRoot.map((it) => {"x": it.x, "y": it.y}).toList();
      obj["validationStatus"] = validationStatus.name;
      obj["parsedData"] =
          parsedData.map((it) => it.toJson(config: config)).toList();
      return obj;
    }