Returns this object in the API's JSON shape.
@override String toJson() { final text = StringBuffer(); for (final part in parts) { text.write(part is Image ? part.toJson() : part); } return text.toString(); }