Map<String, dynamic> toJson() => { "text": text, "path": path, "orientation": orientation, "lines": List<dynamic>.from(lines.map((x) => x.toJson())), };