Toggle Side Panel

  • Home
  • Articles
    • All Articles
    • Blogs
    • Videos
    • Infographics
  • Consultants
    • Salesforce Product Expertise
      • Top Salesforce ConsultantsTop Salesforce Consultants
      • Marketing Cloud ConsultantsMarketing Cloud Consultants
      • Service Cloud ConsultantsService Cloud Consultants
      • Experience Cloud ConsultantsExperience Cloud Consultants
      • Analytics Cloud ConsultantsAnalytics Cloud Consultants
    • Salesforce Industry Expertise
      • Non-Profit Cloud ConsultantsNon-Profit Cloud Consultants
      • Financial Service Cloud ConsultantsFinancial Service Cloud Consultants
      • Health Cloud ConsultantsHealth Cloud Consultants
      • Commerce Cloud ConsultantsCommerce Cloud Consultants
      • Manufacturing Cloud ConsultantsManufacturing Cloud Consultants
    • Salesforce Experts by Location
      • USATop Salesforce Consultants in USA
      • IndiaTop Salesforce Consultants in India
      • AustraliaTop Salesforce Consultants in Australia
      • United KingdomTop Salesforce Consultants in UK
      • CanadaTop Salesforce Consultants in Canada
  • Webinars
  • Marketplace
  • Advertise With Us
  • Contact Us
  • Discussions
More options
    Sign in Sign up
    • Home
    • Articles
      • All Articles
      • Blogs
      • Videos
      • Infographics
    • Consultants
      • Salesforce Product Expertise
        • Top Salesforce ConsultantsTop Salesforce Consultants
        • Marketing Cloud ConsultantsMarketing Cloud Consultants
        • Service Cloud ConsultantsService Cloud Consultants
        • Experience Cloud ConsultantsExperience Cloud Consultants
        • Analytics Cloud ConsultantsAnalytics Cloud Consultants
      • Salesforce Industry Expertise
        • Non-Profit Cloud ConsultantsNon-Profit Cloud Consultants
        • Financial Service Cloud ConsultantsFinancial Service Cloud Consultants
        • Health Cloud ConsultantsHealth Cloud Consultants
        • Commerce Cloud ConsultantsCommerce Cloud Consultants
        • Manufacturing Cloud ConsultantsManufacturing Cloud Consultants
      • Salesforce Experts by Location
        • USATop Salesforce Consultants in USA
        • IndiaTop Salesforce Consultants in India
        • AustraliaTop Salesforce Consultants in Australia
        • United KingdomTop Salesforce Consultants in UK
        • CanadaTop Salesforce Consultants in Canada
    • Webinars
    • Marketplace
    • Advertise With Us
    • Contact Us
    • Discussions
    Close search

    Activity › Forums › Salesforce® Discussions › Measuring Size Of output JSON of REST API?

    Tagged: Account, Debug Logs, JSON, Rest API

    • Salesforce® Discussions

      Measuring Size Of output JSON of REST API?

      Posted by Himanshu on April 30, 2016 at 6:30 PM

      Measuring Size Of output JSON of REST API?

      Matheus replied 9 years ago 3 Members · 2 Replies
      • Account
      • Debug Logs
      • JSON
      • Rest API
    • 2 Replies
    • SFDCHacker

      Member
      May 16, 2016 at 6:31 AM

      `@HttpGet
      global static List getAccounts() {
      List
      accounts = [select id, name from Account];
      System.debug(JSON.serialize(accounts).length());
      return accounts;
      }`

      The above code just does JSON serialisation that SF is going to do instantly, but does it in advance and records it out to the debug log. It's a bit inefficient and only for casual checking

      Realistically, I would use Snuggle from the control range as recorded here:
      http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_rest_code_sample_basic.htm

    • Matheus

      Member
      November 22, 2016 at 1:47 AM

      Salesforce Stack Exchange is your friend 🙂
      http://salesforce.stackexchange.com/questions/1890/measuring-size-of-output-json-of-rest-api

       

      • This reply was modified 9 years ago by  Matheus.

    Log In to reply.

    • Public
    • All Members
    • My Connections
    • Only Me
    • Public
    • All Members
    • My Connections
    • Only Me
    • Public
    • All Members
    • My Connections
    • Only Me

    application solution

    Popular Salesforce Blogs

    4 Reasons Why You Should Use Salesforce Chatbots in 2022

    Blog in Salesforce

    Now that we’ve entered a new year, you have an entire year of growth ahead of you. To maximize your business’ potential this year, it’s…

    Artificial Intelligence Chatbots, Benefits of Chatbots, Better Experience, Bot, Business
    Apphienz Jan 27, 2022
    2,629  Views

    Use Salesforce Lightning Component in Visualforce Page

    Blog in Lightning

    In winter ‘16 a new and powerful feature was introduced which allows you to implement your Salesforce Lightning Component in Visualforce pages. There are three…

    Lightning App, Salesforce Lightning, Salesforce Lightning Component, Visualforce, Visualforce pages
    Piyush Apr 5, 2016
    69,792  Views

    Billing Automation with Salesforce Billing: A Game Changer for Your Business

    Blog in Salesforce

    It is readily apparent that businesses today face the increased pace of technological advancements, fickle and demanding customers, and aggressive competition that they faced yesterday…

    Automated Workflows, Automating Sales Processes, automation tools, Billing Automation, Billing Automation Benefits
    DemandBlue Jul 5, 2023
    1,331  Views

    Popular Salesforce Videos

    Understanding Salesforce Field Service Mobile App - An Overview | AblyPro

    Understanding Salesforce Field Service Mobile App - An Overview | AblyPro

    Video in Salesforce Field Service Platform

    Field Service mobile app is an all-in-one tool designed for today’s mobile workforce. Salesforce Field Service Mobile App is an innovative tool designed to help…

    Salesforce Field Service, customer service, Webinar, Business Requirements, Field Service
    AblyPro Sep 12, 2023
    1,062  Views
    Create and Format Derived Measures

    Create and Format Derived Measures

    Video in Salesforce Stories, Salesforce Training

    In the explorer, you can perform calculations on existing measures and use the results to create a new measure that’s not part of your dataset.…

    Salesforce Training, salesforce, Salesforce Video, Salesforce Learning, Derived Measures
    Nauman May 8, 2020
    4,249  Views
    What is Apex? | Way to become a Salesforce Developer

    What is Apex? | Way to become a Salesforce Developer

    Video in Salesforce Apex, Salesforce Training

    Apex is a development platform for building software as a service (SaaS) applications on top of Salesforce's customer relationship management (CRM) functionality. Apex allows developers…

    Salesforce Apex, salesforce training videos for beginners, Salesforce Developer, Salesforce CRM, Salesforce Tutorials
    Jogender Jun 8, 2018
    3,534  Views
    Footer Forcetalks logo

    support@forcetalks.com

    • twitterx

    Quick Links

    Advertise with Us

    Salesforce® Articles

    Dreamforce 2023

    Top Salesforce® Bloggers 2023

    Top Salesforce Consultants

    Get Listed

    Company

    Contact Us

    About Us

    Privacy Policy

    Terms & Conditions

    InsightHub

    Salesforce Blogs

    Salesforce Videos

    Salesforce Groups

    Salesforce Jobs

    © 2025 - Forcetalks ● All Rights Reserved

    Salesforce® is a trademark of Salesforce® Inc. No claim is made to the exclusive right to use “Salesforce”. Any services offered within the Forcetalks website/app are not sponsored or endorsed by Salesforce®.

    Try AuditMyCRM - It is a Salesforce CRM Audit tool which comprehensively scans your Salesforce org and gives you the list of errors or warnings you need to take care of.
    We use cookies to enhance your browsing experience. Please see our privacy policy if you'd like more information on our use of cookies.