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, 4 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

    • 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, 4 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

    application solution

    Popular Salesforce Blogs

    Increase your sales and boost your profits with the power of QuickBooks and Salesforce

    Blog in Salesforce

    Today’s digital-savvy and well-informed customers demand superlative and personalized customer service from every brand they interact with. They expect brands to know their preferences and…

    AWS, Bookkeeping, Business, CRM, CRM Platform
    SaaSnic Aug 4, 2020
    2,540  Views

    7 Most Common Questions About Salesforce Certifications

    Blog in Salesforce Certifications

    Salesforce certifications mark the first major milestone in a Salesforce professional’s career. They are great for power users that are looking to dive into Salesforce’s…

    App Builder Certification, Salesforce Admin, Salesforce Admin Certification, Salesforce Adminstrator, Salesforce Career
    Simplilearn May 2, 2019
    4,080  Views

    LWC Interview Questions - Part 1

    Blog in Salesforce

    Important Questions Question 1: What is the basic structure of a Lightning Web Component in LWC? Answer: The basic structure of a Lightning Web Component…

    Aura Components, Authentication, Authorization, Basic structure, Best Practices
    SF Jul 12, 2023
    1,457  Views

    Popular Salesforce Videos

    Agile in Salesforce | Agile Salesforce Implementation

    Agile in Salesforce | Agile Salesforce Implementation

    Video in Salesforce Implementation

    Watch this video to learn about Agile Salesforce Implementation When Salesforce met Agile Agile vs Waterfall Introduction to Scrum Scrum Roles Scrum Ceremonies Q&A

    Salesforce Training, Salesforce Tutorial, Salesforce Implementation, Salesforce Video, Salesforce Learning
    Jogender Jun 29, 2021
    2,598  Views
    Can I Get a Job by Just Learning Salesforce Admin?

    Can I Get a Job by Just Learning Salesforce Admin?

    Video in Salesforce Training, Salesforce Admin

    In this Video Shrey covered the following questions: 1. Can I get a job by just learning Salesforce Admin? 2. Can you start a career…

    Salesforce Training, Salesforce Tutorial, salesforce, Salesforce Admin, Salesforce Video
    Abhishek Oct 18, 2021
    2,500  Views
    A Step-by-Step Guide to Scheduling Policies in Salesforce Field Service | AblyPro Webinar

    A Step-by-Step Guide to Scheduling Policies in Salesforce Field Service | AblyPro Webinar

    Video in Others

    Salesforce Field Service is a comprehensive platform for scheduling policies and optimization tools, to manage field service operations more efficiently. It provides real-time intelligent scheduling…

    Salesforce Tutorial, salesforce, Salesforce Video, Salesforce Field Service, Business
    AblyPro Oct 26, 2023
    1,023  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®.

    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.