Toggle Side Panel

  • Blogs
  • 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
  • Contact Us
  • Discussions
More options
    Sign in Sign up
    • Blogs
    • 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
    • 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, 10 months 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

    • [adinserter block='9']
    • 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, 10 months 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

    Popular Salesforce Blogs

    Iteration Components Used In Salesforce VisualForce Pages

    Iteration Components Used In Salesforce VisualForce Pages

    Blog in Visualforce

    Iteration Components Used In Salesforce Visualforce Pages Iteration Components allow you to display the output of content on the page in the form of a…

    AURA, Iteration Components, List in Salesforce, List View, Pagination
    Archit Jan 23, 2018
    20,250  Views
    Salesforce AI-based Tools

    Experience the Future of Sales with Salesforce AI-based Tools

    Blog in Salesforce Einstein

    Solving strategic problems is more important than handling operational tasks when it comes to achieving critical targets in sales. Usage of Salesforce AI-based Tools allows…

    Business, Business Growth, Cloud Automation, Communications, Customer Deals
    Bolt Jan 24, 2022
    3,235  Views
    Freeze and Deactivate User Accounts in Salesforce

    How to Freeze and Deactivate User Accounts in Salesforce

    Blog in Salesforce

    Introduction  Here we are going to learn about how to freeze the user and deactivate the user. If your employee left your company then you…

    Company Information, Deactivate the User, Deactivating the User Account, Freeze the User, Freezing of User Accounts
    Anshu Oct 25, 2021
    5,937  Views

    Popular Salesforce Videos

    EPC and CPQ in Salesforce Industries (Vlocity)

    EPC and CPQ in Salesforce Industries (Vlocity)

    Video in Salesforce Stories, Salesforce Communities

    Enterprise Product Catalog (EPC) to configure and manage CPQ in one place. It's a guided selling experience for users to build an order. While CPQ…

    Salesforce Training, Salesforce Tutorial, salesforce, CPQ, Salesforce Video
    Cyntexa Oct 26, 2022
    4,311  Views
    How To Become a Salesforce Developer [Perfect Guide for Beginners]

    How To Become a Salesforce Developer [Perfect Guide for Beginners]

    Video in Others

    Curious about a career in Salesforce development? Our video is your concise guide to getting started.  What's inside:→ The average salary for a Salesforce Developer…

    ENWAY Sep 5, 2025
    272  Views
    What is Salesforce | Salesforce CRM Tutorial For Beginners | Salesforce Training

    What is Salesforce | Salesforce CRM Tutorial For Beginners | Salesforce Training

    Video in Salesforce Training

    This Salesforce Training Video will help you understand what is a CRM ( Customer Relationship Management ), why we need Salesforce CRM and how some…

    Salesforce Training, Salesforce Certification, What Is Salesforce, Salesforce Implementation, Salesforce Course
    Simplilearn Apr 23, 2019
    2,740  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

    © 2026 - 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®.

    We use cookies to enhance your browsing experience. Please see our privacy policy if you'd like more information on our use of cookies.