add member function toJson that points to serializeJson, this needs support for none type bound mimetype