The Profile and Pattern Cards are all stored in the Sitecore SQL Databases (master and web) so you can get the list of Patterns or Profile Cards for a given Profile via the Sitecore API.
Profiles are stored under
/sitecore/system/Marketing Control Panel/Profiles and each Profile has its own set of Profile and Pattern Cards. When you have the Items they can be cast to their respective Types with constructors or Create methods.
// cast Sitecore Item to Profile
var profile = new ProfileItem(item);
Profile Card: Sitecore.Analytics.Data.Items.ProfileCardItem
// get profile cards from a profile item
var profileCards = profile.ProfileCards;
// cast Sitecore Item to Profile Card
var profileCard = ProfileCardItem.Create(item);
Pattern Card: Sitecore.Analytics.Data.Items.PatternCardItem
// get pattern cards from a profile item
var patternCards = profile.Patterns;
// cast Sitecore Item to Pattern Card
var patternCard= PatternCardItem.Create(item);
Converting C# objects to json:
Libraries are available to help with this. A popular one is Newtonsoft.Json which is available via NuGet: https://www.nuget.org/packages/Newtonsoft.Json/
var jsonString = Newtonsoft.Json.JsonConvert.SerializeObject(profileCardsObject);
It may be a good idea to select these objects into custom objects with only the properties you want in the resulting json object.