# 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["fields"] = fields.map((it) => it.toJson(config: config)).toList();
      obj["children"] = children.map((it) => it.toJson(config: config)).toList();
      obj["quad"] = quad.map((it) => {"x": it.x, "y": it.y}).toList();
      obj["quadInRoot"] = quadInRoot.map((it) => {"x": it.x, "y": it.y}).toList();
      if (config.serializeImages) {
        obj["crop"] = (crop != null ? crop!.toJson() : null);
      }
      obj["confidence"] = confidence;
      obj["confidenceWeight"] = confidenceWeight;
      return obj;
    }