0

I am trying to deserialise the following JSON object and get it to display on a visualforce page. However the fields displayed by the page are blank.

I debugged the code to the point where I know I am feeding the correct json body to the deserialising module.

public class MMarkMetadata {

    public class Meta {
    }

    public class Google_play_apps {
        public Integer id {get; set;}
        public String app_name {get; set;}
        public String package_id {get; set;}
        public Integer company_id {get; set;}
        public String company_name {get; set;}
        public String company_domain {get; set;}
        public String play_url {get; set;}
    }

    public class Company {
        public Meta Meta {get; set;}
        public Data Data {get; set;}
    }

    public class Funding {
        public String amount {get; set;}
        public String deal_currency {get; set;}
        public String series {get; set;}
        public String funding_date {get; set;}
        public String news_url {get; set;}
        public String source {get; set;}
        public List<Integer> investor_ids {get; set;}
        public String investors {get; set;}
    }

    public class Growth_scores {
        public String recorded_at {get; set;}
        public String score {get; set;}
    }

    public class Data {
        public String name {get; set;}
        public String description {get; set;}
        public String website {get; set;}
        public String mattermark_score {get; set;}
        public String employees {get; set;}
        public String employees_month_ago {get; set;}
        public String employees_6_months_ago {get; set;}
        public String website_uniques {get; set;}
        public Object mobile_downloads {get; set;}
        public String stage {get; set;}
        public String total_funding {get; set;}
        public String last_funding_amount {get; set;}
        public String last_funding_date {get; set;}
        public String location {get; set;}
        public String city {get; set;}
        public Object state {get; set;}
        public String country {get; set;}
        public Object zip {get; set;}
        public String twitter_handle {get; set;}
        public String facebook_handle {get; set;}
        public String linkedin_id {get; set;}
        public List<Funding> funding {get; set;}
        public List<Stories> stories {get; set;}
        public List<Growth_scores> growth_scores {get; set;}
        public List<Growth_scores> mindshare_scores {get; set;}
        public List<Meta> acquired_by {get; set;}
        public List<Meta> acquired_companies {get; set;}
        public String est_founding_date {get; set;}
        public List<String> business_models {get; set;}
        public List<String> industries {get; set;}
        public List<Growth_scores> mattermark_weekly_momentum {get; set;}
        public List<Growth_scores> employee_count {get; set;}
        public List<Growth_scores> alexa_rank {get; set;}
        public List<Growth_scores> facebook_talking_count {get; set;}
        public List<Growth_scores> facebook_like_count {get; set;}
        public List<Growth_scores> twitter_follower_count {get; set;}
        public List<Meta> twitter_mentions {get; set;}
        public List<Growth_scores> linkedin_follower_count {get; set;}
        public List<Meta> itunes_usa_weekly_download {get; set;}
        public List<Growth_scores> inbound_links {get; set;}
        public List<Growth_scores> est_monthly_uniques {get; set;}
        public String added_date {get; set;}
        public String revenue_range {get; set;}
        public List<Google_play_apps> google_play_apps {get; set;}
        public List<Itunes_apps> itunes_apps {get; set;}
        public List<Meta> ipos {get; set;}
    }

    public class Stories {
        public String title {get; set;}
        public String url {get; set;}
        public String story_date {get; set;}
        public String source {get; set;}
    }

    public class Itunes_apps {
        public String developer_url {get; set;}
        public String itunes_id {get; set;}
        public String itunes_url {get; set;}
        public String app_name {get; set;}
    }
}

Script:

public class MMarkParser {
    public MMarkMetadata.Company wrapper {
        get;
        set;
    }

    public void parse() {

        string domain = 'revolut.com';

        string companyID = companyIDFetcher.companyIDFetcher(domain);
        system.debug('company ID is'+companyID);

        HTTPRequest request = new HTTPRequest();
        request.setEndpoint('https://api.database.com/name='+companyID);  
        request.setMethod('GET');

        HTTP h = new HTTP();
        HTTPResponse response = h.send(request);
        string strresponse = response.getBody();
        system.debug(strresponse);

        this.wrapper = (MMarkMetadata.Company) JSON.deserialize(response.getBody(), MMarkMetadata.Company.class);
        System.debug(wrapper);
    }
}

Page:

<apex:page controller="MMarkParser" tabStyle="Lead">
    <apex:form >
        <apex:pageBlock title="MMark">
            <apex:commandButton value="submit" action="{!parse}" rendered="{!$CurrentPage.parameters.offline!='1'}"/>
            <apex:pageBlockTable value="{!wrapper}" var="w">
                <apex:column headerValue="name" value="{!w.name}"/>
                <apex:column headerValue="description" value="{!w.description}"/>
                <apex:column headerValue="employees" value="{!w.employees}"/>
                <apex:column headerValue="website" value="{!w.website}"/>
            </apex:pageBlockTable>
        </apex:pageBlock>
    </apex:form>
</apex:page>

JSON from response:

{
  "meta": {},
  "data": {
    "name": "Revolut",
    "description": "Revolut combines an app for sending money, facilitated via SMS, WhatsApp or social media channels, with a prepaid multi-currency Mastercard that enables users to spend and withdraw cash in 23 different currencies without being charged foreign exchange fees.",
    "website": "revolut.com",
    "mattermark_score": "189",
    "employees": "63",
    "employees_month_ago": "60",
    "employees_6_months_ago": "48",
    "website_uniques": "40693",
    "mobile_downloads": null,
    "stage": "a",
    "total_funding": "17135000",
    "last_funding_amount": "10000000",
    "last_funding_date": "2016-07-11",
    "location": "london",
    "city": "London",
    "state": null,
    "country": "gbr",
    "zip": null,
    "twitter_handle": "RevolutApp",
    "facebook_handle": "RevolutApp",
    "linkedin_id": "5356541",
    "funding": [
      {
        "amount": "2335000",
        "currency": "USD",
        "series": "seed",
        "funding_date": "2015-07-20",
        "news_url": "http://techcitynews.com/2015/07/20/international-money-service-revolut-raises-1-5m-from-balderton-capital/",
        "source": "derived",
        "investor_ids": [
          566,
          13515
        ],
        "investors": "Balderton Capital, Seedcamp"
      },
      {
        "amount": "4800000",
        "currency": "USD",
        "series": "seed",
        "funding_date": "2016-02-04",
        "news_url": "http://techcitynews.com/2016/02/04/british-startup-revolut-closes-4-8m-seed-round/",
        "source": "derived",
        "investor_ids": [
          17,
          2120,
          5456,
          13515
        ],
        "investors": "Index Ventures, Point Nine Capital, Venrex Investment Management, Seedcamp"
      },
      {
        "amount": "10000000",
        "currency": "USD",
        "series": "a",
        "funding_date": "2016-07-11",
        "news_url": "http://feedproxy.google.com/~r/thepaypers/cfKW/~3/fUZSOAPHcss/765260-0",
        "source": "derived",
        "investor_ids": [
          17,
          566,
          2120,
          5456,
          13515
        ],
        "investors": "Index Ventures, Balderton Capital, Point Nine Capital, Venrex Investment Management, Seedcamp"
      }
    ],
    "stories": [
      {
        "title": "Revolut founder hits back at Brexit 'scaremongers'",
        "url": "https://www.finextra.com/newsarticle/30457/revolut-founder-hits-back-at-brexit-scaremongers?utm_medium=rss&utm_source=finextrafeed",
        "date": "Apr 20 2017",
        "source": "Finextra"
      },
      {
        "title": "Revolut joins forces with online mortgage broker Trussle",
        "url": "https://www.finextra.com/pressarticle/68880/revolut-joins-forces-with-online-mortgage-broker-trussle?utm_medium=rss&utm_source=finextrafeed",
        "date": "Apr 18 2017",
        "source": "Finextra"
      },
      {
        "title": "Blond creates stripped-back bank card for financial services start-up Revolut",
        "url": "http://feedproxy.google.com/~r/dezeen/~3/Wu6VvNuSjwA/",
        "date": "Apr 14 2017",
        "source": "Dezeen"
      },
      {
        "title": "The Complete Guide to Using Revolut for P2P Lending Investors",
        "url": "http://www.p2p-banking.com/countries/uk-the-complete-guide-to-using-revolut-for-p2p-lending-investors/",
        "date": "Apr 05 2017",
        "source": "P2P-Banking.com"
      },
      {
        "title": "Revolut Plans New Venture Crowdfund, Switches Platforms",
        "url": "http://www.pymnts.com/news/2017/revolut-plans-new-venture-crowdfund-switches-platforms/",
        "date": "Mar 24 2017",
        "source": "PYMNTS.com"
      },
      {
        "title": "Revolut launches a premium subscription and starts raising a new round",
        "url": "http://feedproxy.google.com/~r/Techcrunch/~3/TsICBU4wnKA/",
        "date": "Mar 23 2017",
        "source": "Techcrunch"
      },
      {
        "title": "Revolut to undertake £4 million crowdfund raise; launches subscription service",
        "url": "https://www.finextra.com/newsarticle/30321/revolut-to-undertake-4-million-crowdfund-raise-launches-subscription-service?utm_medium=rss&utm_source=finextrafeed",
        "date": "Mar 23 2017",
        "source": "Finextra"
      },
      {
        "title": "Revolut is raising another £4 million through crowdfunding — but this time it's going for Seedrs",
        "url": "http://www.businessinsider.com/revolut-crowdfunding-4-million-on-seedrs-launching-premium-product-2017-3",
        "date": "Mar 23 2017",
        "source": "BusinessInsider"
      },
      {
        "title": "A World Beyond Banking: Revolut Offers Premium Membership, Preps for Crowdfunding Offer on Seedrs",
        "url": "http://www.crowdfundinsider.com/2017/03/97651-world-beyond-banking-revolut-offers-premium-membership-preps-crowdfunding-offer-seedrs/",
        "date": "Mar 22 2017",
        "source": "Crowdfund Insider"
      },
      {
        "title": "The 'King of Mining' and a former Merrill Lynch dealmaker back fintech startup Revolut",
        "url": "http://www.businessinsider.com/fintech-app-revolut-investors-ian-hannam-matthew-greenburgh-2017-3",
        "date": "Mar 17 2017",
        "source": "BusinessInsider"
      },
      {
        "title": "Challenger Bank Revolut & Lending Works Partner Up to Provide Instant Credit Anywhere",
        "url": "http://www.crowdfundinsider.com/2017/03/97376-challenger-bank-revolut-lending-works-partner-provide-instant-credit-anywhere/",
        "date": "Mar 14 2017",
        "source": "Crowdfund Insider"
      },
      {
        "title": "Revolut users can now apply for credit in just a few minutes",
        "url": "http://feedproxy.google.com/~r/Techcrunch/~3/KBUlWakpwzI/",
        "date": "Mar 14 2017",
        "source": "Techcrunch"
      },
      {
        "title": "Hot fintech app Revolut is letting people borrow £5,000 through its app in minutes as it goes 'beyond banking'",
        "url": "http://www.businessinsider.com/fintech-app-revolut-launches-peer-to-peer-loans-property-isa-plans-more-products-2017-3",
        "date": "Mar 14 2017",
        "source": "BusinessInsider"
      },
      {
        "title": "Revolut partners with P2P lender to offer customers cut-price instant credit",
        "url": "https://www.finextra.com/pressarticle/68446/revolut-partners-with-p2p-lender-to-offer-customers-cut-price-instant-credit?utm_medium=rss&utm_source=finextrafeed",
        "date": "Mar 14 2017",
        "source": "Finextra"
      },
      {
        "title": "Revolut is the latest fintech startup trying to convince you it is better than a bank",
        "url": "http://www.businessinsider.com/fintech-revolut-neobank-banking-competition-2017-2",
        "date": "Feb 11 2017",
        "source": "BusinessInsider"
      },
      {
        "title": "Revolut launches current accounts and a chatbot",
        "url": "http://feedproxy.google.com/~r/Techcrunch/~3/vdMsuE-QqeQ/",
        "date": "Feb 08 2017",
        "source": "Techcrunch"
      },
      {
        "title": "Meet Rita; Revolut's troubleshooting digital assistant",
        "url": "https://www.finextra.com/newsarticle/30110/meet-rita-revoluts-troubleshooting-digital-assistant?utm_medium=rss&utm_source=finextrafeed",
        "date": "Feb 08 2017",
        "source": "Finextra"
      },
      {
        "title": "Revolut Unveils Billsplitting Feature",
        "url": "http://finovate.com/revolut-unveils-billsplitting-feature/",
        "date": "Jan 18 2017",
        "source": "Finovate"
      },
      {
        "title": "Revolut releases bill-splitting feature",
        "url": "https://www.finextra.com/pressarticle/67667/revolut-releases-bill-splitting-feature?utm_medium=rss&utm_source=finextrafeed",
        "date": "Jan 17 2017",
        "source": "Finextra"
      },
      {
        "title": "Revolut lets you split bills in a few taps",
        "url": "http://feedproxy.google.com/~r/Techcrunch/~3/en03OuZiZi8/",
        "date": "Jan 17 2017",
        "source": "Techcrunch"
      },
      {
        "title": "Fintech Revolut raises fees as it waits for licence",
        "url": "http://feeds.businessinsider.com.au/~/240952526/0/businessinsideraustraliaau~Fintech-Revolut-raises-fees-as-it-waits-for-licence",
        "date": "Dec 09 2016",
        "source": "Business Insider Australia"
      },
      {
        "title": "Fintech Revolut raises fees as it waits for licence",
        "url": "http://www.businessinsider.com/fintech-revolut-raises-atm-fees-waits-mastercard-licence-2016-12",
        "date": "Dec 09 2016",
        "source": "BusinessInsider"
      },
      {
        "title": "Revolut Suspends New Card Issues As It Seeks Its Own License",
        "url": "http://www.pymnts.com/news/payment-methods/2016/revolut-suspension-new-card-issuing-license/",
        "date": "Nov 24 2016",
        "source": "PYMNTS.com"
      },
      {
        "title": "Hot fintech app Revolut stops issuing new cards as it changes licences",
        "url": "http://www.businessinsider.com/fintech-revolut-issuing-new-cards-delay-europe-international-waiting-list-paysafe-2016-11",
        "date": "Nov 23 2016",
        "source": "BusinessInsider"
      },
      {
        "title": "Revolut Disables Cards for Customers Outside EEA",
        "url": "http://bankinnovation.net/2016/11/revolut-disables-cards-for-customers-outside-eea/",
        "date": "Nov 18 2016",
        "source": "Bank Innovation"
      },
      {
        "title": "More than 3,000 companies have signed up to hot fintech Revolut's new business service",
        "url": "http://www.businessinsider.com/revolut-business-sign-ups-fintech-fx-2016-9",
        "date": "Sep 14 2016",
        "source": "BusinessInsider"
      },
      {
        "title": "Revolut for Mobile Currency Exchange Closes Its Seed Round",
        "url": "http://www.pymnts.com/news/investment-tracker/2016/revolut-for-mobile-currency-exchange/",
        "date": "Aug 03 2016",
        "source": "PYMNTS"
      },
      {
        "title": "Revolut’s Crowdfunding Campaign Hits $17MM in Two Days",
        "url": "http://bankinnovation.net/2016/07/revoluts-crowdfunding-efforts-surpass-17mm-in-two-days/",
        "date": "Jul 13 2016",
        "source": "Bank Innovation"
      },
      {
        "title": "Record Breaking: Revolut Has Over £13.8 Million in Investment Pledges",
        "url": "http://www.crowdfundinsider.com/2016/07/87851-record-breaking-revolut-13-8-million-investment-pledges/",
        "date": "Jul 13 2016",
        "source": "Crowdfund Insider"
      },
      {
        "title": "Fintech Startup Revolut Receives £12.9M in Pledges via Crowdcube",
        "url": "http://www.finsmes.com/2016/07/fintech-startup-revolut-raises-12-9m-via-crowdcube.html",
        "date": "Jul 13 2016",
        "source": "FinSMEs"
      },
      {
        "title": "Fintech Revolut's crowdfunding is going nuts, with £12 million pledged already",
        "url": "http://www.businessinsider.com/fintech-revolut-crowdfunding-pledges-brexit-crowdcube-2016-7",
        "date": "Jul 13 2016",
        "source": "BusinessInsider"
      },
      {
        "title": "Fintech, Currency Transfer App Revolut Raises £6.75M",
        "url": "http://www.finsmes.com/2016/07/fintech-currency-transfer-app-revolut-raises-6-75m.html",
        "date": "Jul 11 2016",
        "source": "FinSMEs"
      },
      {
        "title": "Revolut Will Offer Shares on Crowdcube, Investors Rush to Sign Up",
        "url": "http://www.crowdfundinsider.com/2016/07/87777-revolut-will-offer-shares-on-crowdcube-investors-rush-to-sign-up/",
        "date": "Jul 11 2016",
        "source": "Crowdfund Insider"
      },
      {
        "title": "Revolut Lands $8.7 Million, Launches Crowdfunding Campaign",
        "url": "http://finovate.com/revolut-lands-8-7-million-launches-crowdfunding-campaign/",
        "date": "Jul 11 2016",
        "source": "Finovate"
      },
      {
        "title": "Payments startup Revolut invites customers to close the Series A round with a crowdfunding campaign",
        "url": "http://feedproxy.google.com/~r/eu-startups/~3/Cw1K3Ee8UCs/",
        "date": "Jul 11 2016",
        "source": "EU Startups"
      },
      {
        "title": "Revolut raises GBP 7.75 mln in July 2016 despite Brexit",
        "url": "http://feedproxy.google.com/~r/thepaypers/cfKW/~3/fUZSOAPHcss/765260-0",
        "date": "Jul 11 2016",
        "source": "The Paypers"
      },
      {
        "title": "Revolut announces participation in MasterCard Start Path programme",
        "url": "http://feedproxy.google.com/~r/thepaypers/cfKW/~3/IZltc5Q-cY4/764958-0",
        "date": "Jun 21 2016",
        "source": "The Paypers"
      },
      {
        "title": "Revolut Receives FCA License, Announces $1 Billion Annual Run Rate",
        "url": "http://finovate.com/revolut/",
        "date": "May 20 2016",
        "source": "Finovate"
      },
      {
        "title": "Revolut’s send and spend without borders",
        "url": "http://www.techcityinsider.net/revoluts-send-and-spend-without-borders/",
        "date": "Mar 31 2016",
        "source": "TechCityInsider London"
      },
      {
        "title": "Index Ventures joins seed funding round for London-based global money app, Revolut, with £1M investment",
        "url": "http://www.closingcircle.com/12005-2/",
        "date": "Feb 08 2016",
        "source": "Closing Circle"
      },
      {
        "title": "Revolut Closes £3.2M Seed Funding",
        "url": "http://www.finsmes.com/2016/02/revolut-closes-3-2m-seed-funding.html",
        "date": "Feb 07 2016",
        "source": "FinSMEs"
      },
      {
        "title": "Revolut Gets More Funding For Its Mobile Foreign Exchange Service",
        "url": "http://feedproxy.google.com/~r/Techcrunch/~3/lDdgu5ttaic/",
        "date": "Feb 05 2016",
        "source": "Techcrunch"
      },
      {
        "title": "British startup Revolut closes $4.8m Seed round",
        "url": "http://techcitynews.com/2016/02/04/british-startup-revolut-closes-4-8m-seed-round/",
        "date": "Feb 04 2016",
        "source": "Tech City News"
      },
      {
        "title": "Revolut passes $200m in transactions; closes $4.8m Seed round",
        "url": "https://www.finextra.com/news/announcement.aspx?pressreleaseid=62976",
        "date": "Feb 04 2016",
        "source": "Finextra"
      },
      {
        "title": "London Fintech Entrepreneur Talking About A Revolution",
        "url": "http://www.forbes.com/sites/philipsalter/2015/12/09/london-fintech-entrepreneur-talking-about-a-revolution/",
        "date": "Dec 09 2015",
        "source": "Forbes"
      },
      {
        "title": "Revolut, a money exchange service, raises £1.5M from Balderton Capital",
        "url": "http://www.closingcircle.com/revolut/",
        "date": "Aug 05 2015",
        "source": "Closing Circle"
      },
      {
        "title": "Revolut Raises £1.5M in Funding",
        "url": "http://www.finsmes.com/2015/08/revolut-raises-1-5m-in-funding.html",
        "date": "Aug 04 2015",
        "source": "FinSMEs"
      },
      {
        "title": "Revolut Raises £1.5m through Balderton Capital for its Alternative Foreign Exchange Service",
        "url": "http://www.crowdfundinsider.com/2015/07/71537-revolut-raises-1-5m-through-balderton-capital-for-its-alternative-foreign-exchange-service/",
        "date": "Jul 21 2015",
        "source": "Crowdfund Insider"
      },
      {
        "title": "Alternative foreign exchange service Revolut raises £1.5m through Balderton Capital",
        "url": "http://www.growthbusiness.co.uk/news-and-market-deals/fundraising-deals/2489556/alternative-foreign-exchange-service-revolut-raises-15m-through-balderton-capital.thtml",
        "date": "Jul 21 2015",
        "source": "Growth Business Uk"
      },
      {
        "title": "Revolut, fintech startup raised $2.3 million from Balderton Capital",
        "url": "http://www.thetechbulletin.com/revolut-fintech-startup-raised-2-3-million-from-balderton-capital-27372/",
        "date": "Jul 21 2015",
        "source": "The Tech Bulletin"
      },
      {
        "title": "Revolut Launches with Fresh £1.5M in Funding and Goal to Replace Banks",
        "url": "http://www.financemagnates.com/fintech/payments/revolut-launches-with-fresh-1-5m-in-funding-and-goal-to-replace-banks/",
        "date": "Jul 20 2015",
        "source": "Forex Magnates"
      },
      {
        "title": "Revolut Raises $2.3 Million For Its Mobile Foreign Exchange Service",
        "url": "http://feedproxy.google.com/~r/Techcrunch/~3/L3BDV8piu4s/",
        "date": "Jul 20 2015",
        "source": "Techcrunch"
      },
      {
        "title": "Revolut raises £1.5m in funding",
        "url": "http://www.finextra.com/news/announcement.aspx?pressreleaseid=60516",
        "date": "Jul 20 2015",
        "source": "Finextra"
      },
      {
        "title": "International money service Revolut raises £1.5m from Balderton Capital",
        "url": "http://techcitynews.com/2015/07/20/international-money-service-revolut-raises-1-5m-from-balderton-capital/",
        "date": "Jul 20 2015",
        "source": "Tech City News"
      },
      {
        "title": "Revolut Presents its Personal Money Cloud Removes All Hidden Banking Costs",
        "url": "http://finovate.com/2015/02/revolut-presents-its-personal-money-cloud-removes-all-hidden-banking-costs.html",
        "date": "Feb 11 2015",
        "source": "Finovate"
      }
    ],
    "growth_scores": [
      {
        "recorded_at": "2016-11-13 00:00:00 +0000",
        "score": "523"
      },
      {
        "recorded_at": "2016-11-06 00:00:00 +0000",
        "score": "575"
      },
      {
        "recorded_at": "2016-10-30 00:00:00 +0000",
        "score": "631"
      },
      {
        "recorded_at": "2016-10-23 00:00:00 +0000",
        "score": "644"
      },

    ],
    "added_date": "2014-10-21 15:37:34",
    "revenue_range": "$1M - $5M",
    "google_play_apps": [
      {
        "id": 1891103,
        "app_name": "Revolut - Foreign Exchange",
        "package_id": "com.revolut.revolut",
        "company_id": 10648207,
        "company_name": "Revolut",
        "company_domain": "revolut.com",
        "play_url": "http://play.google.com/store/apps/details?id=com.revolut.revolut"
      }
    ],
    "itunes_apps": [
      {
        "developer_url": "https://revolut.com/",
        "itunes_id": "932493382",
        "itunes_url": "https://itunes.apple.com/us/app/revolut-spend-exchange-transfer/id932493382?mt=8&uo=2",
        "app_name": "Revolut"
      }
    ],
    "ipos": []
  }
}
6
  • can you update question with example of json from response Jun 2, 2017 at 14:19
  • Done, now available in the original post Jun 2, 2017 at 14:22
  • You should refresh the pageBlockTable after fetching the data using reRender attribute in commandButton. In order to refresh add id to the pageblock button and and then use that id in the reRender attribute
    – anmrk
    Jun 2, 2017 at 14:42
  • Added reRender="MMark". Still I am getting the following error for the visualforce page: Unknown property 'MMarkMetadata.Company.name' Jun 2, 2017 at 14:47
  • you need to use {!w.data.name}. Also why are you using a pageBlockTable if you are trying to display a single record
    – anmrk
    Jun 2, 2017 at 15:10

1 Answer 1

0

Your JSON will not deserialize anything into the Company property of your class

Your JSON is essentially just an object { ... } and will deserialize into the classic you specified.

MMarkMetadata.Meta and MMarkMetadata.data will have values but MMarkMetadata.Company will not

If it had been structured as { "company" : { "meta" : {}, "data" :{} } } then you would have value in Company. The example may be a bit off but essentially there is no key for Company in your JSON string

Pasting your JSON string in jsonLint shows an error in the string in that there is a dangling comma.

Once that was fixed, putting the string into json2Apex gave the following results (Modified to use your class name):

//
// Generated by JSON2Apex http://json2apex.herokuapp.com/
//

public class MMarkMetadata {

    public class Meta {
    }

    public class Google_play_apps {
        public Integer id;
        public String app_name;
        public String package_id;
        public Integer company_id;
        public String company_name;
        public String company_domain;
        public String play_url;
    }

    public class MMarkMetadata {
        public Meta meta;
        public Data data;
    }

    public class Funding {
        public String amount;
        public String currency;
        public String series;
        public String funding_date;
        public String news_url;
        public String source;
        public List<Integer> investor_ids;
        public String investors;
    }

    public class Growth_scores {
        public String recorded_at;
        public String score;
    }

    public class Data {
        public String name;
        public String description;
        public String website;
        public String mattermark_score;
        public String employees;
        public String employees_month_ago;
        public String employees_6_months_ago;
        public String website_uniques;
        public Object mobile_downloads;
        public String stage;
        public String total_funding;
        public String last_funding_amount;
        public String last_funding_date;
        public String location;
        public String city;
        public Object state;
        public String country;
        public Object zip;
        public String twitter_handle;
        public String facebook_handle;
        public String linkedin_id;
        public List<Funding> funding;
        public List<Stories> stories;
        public List<Growth_scores> growth_scores;
        public String added_date;
        public String revenue_range;
        public List<Google_play_apps> google_play_apps;
        public List<Itunes_apps> itunes_apps;
        public List<Meta> ipos;
    }

    public class Stories {
        public String title;
        public String url;
        public String date;
        public String source;
    }

    public class Itunes_apps {
        public String developer_url;
        public String itunes_id;
        public String itunes_url;
        public String app_name;
    }


    public static MMarkMetadata parse(String json) {
        return (MMarkMetadata) System.JSON.deserialize(json, MMarkMetadata.class);
    }
}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .