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 10 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

    • [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 10 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

    Popular Salesforce Blogs

    Salesforce Predictions 2020: What does the Future Hold for Salesforce?

    Blog in Others

    Salesforce, the market leader in CRM, has created a storm in the world of sales and marketing of products and services catering to a diverse…

    Einstein Analytics, Financial Services Cloud, Salesforce Aquisitions, Salesforce Consulting Companies, Salesforce CRM
    Algoworks Jan 2, 2020
    6,155  Views

    Loan Processing, Qualification, and KYC Automation in Salesforce

    Blog in Salesforce

    Financial institutions always work on improving customer service, so they strive for improvements in work efficiency. The most important feature they need here is process…

    Automated Solutions, Automated Workflow, Customer Behaviour, Customer Details, Customer Service
    360 Degree Sep 30, 2021
    2,785  Views

    Top Salesforce Trends To Watch Out In 2024

    Blog in Salesforce

    The cloud is a powerful tool that can help businesses grow exponentially. Top Salesforce CRM Trends in 2024 Let’s dig deeper into the current trends…

    AR Devices, Artificial Intelligence, Audience Segmentation, Augmented Reality, AWS
    Hennery cavil Dec 13, 2023
    1,826  Views

    Popular Salesforce Videos

    Salesforce Payments - Everything You Need To Know

    Salesforce Payments - Everything You Need To Know

    Video in Salesforce Products

    Learn more about Salesforce Payments and get the checklist - "10 Ways To Make Salesforce Payments Safe, Easy And Profitable" In this checklist, you'll learn…

    Salesforce Training, Salesforce Tutorial, Salesforce Video, Customers, Salesforce Learning
    Neha Yadav Mar 15, 2021
    2,284  Views
    Salesforce Connections 2018 Keynote - Ch. 4: U.S. Bank Is A Trailblazer

    Salesforce Connections 2018 Keynote - Ch. 4: U.S. Bank Is A Trailblazer

    Video in Events

    Salesforce Connections 2018 Keynote – Ch. 1: Corporate Positioning Salesforce Connections 2018 Keynote – Ch. 2: Ticketmaster Is A Trailblazer Salesforce Connections 2018 Keynote –…

    Salesforce CRM, Salesforce Keynote, Salesforce Connections, Salesforce Events, US Banks
    Hazel Jul 11, 2018
    1,909  Views
    Benefits of Having Veteran In an Organization | Career in Salesforce

    Benefits of Having Veteran In an Organization | Career in Salesforce

    Video in Salesforce Training

    Let's Understand how a veteran can start their career in Salesforce? In this Episode Davis and Shrey covered the following questions: 1. About his background and…

    Salesforce Training, Salesforce Jobs, Salesforce Certification, Trailhead, Salesforce Hulk
    S2 Nov 17, 2021
    1,892  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.