Hi @toothless, there's no set in stone guide on how to develop an integration with those platforms. HubSpot does have an integration in the Marketplace with Zendesk already that you can leverage here: https://www.hubspot.com/integrations/zendesk.
If you're creating from scratch, you'll need to work with the HubSpot objects. You'll have to pull down the data from Zendesk and Freshdesk, format it so that it works with the HubSpot tickets API, then push that data to HubSpot using our APIs. Not entirely sure what you mean by which format you should develop the integration in, but our main objects like tickets, deals, contacts and companies all need to be formatted in JSON.
If you don't want to have tickets created inside of HubSpot, you could always surface their information from your external system using the CRM extensions api: https://developers.hubspot.com/docs/methods/crm-extensions/crm-extensions-overview