• venugopalg sfdc
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
I have created a Case object like below
Case testCase = new Case(
            Subject = 'Test record',
            Status = 'New',
            Origin = 'Phone',
            Priority = 'Medium');

I am getting below output when I serialize it using JSON.serialize(testCase). 

{"attributes":{"type":"Case"},"Subject":"Test record","Status":"New","Origin":"Phone","Priority":"Medium"}

Any idea why did "attributes" property add to the JSON and how to avoid it or is there any predefined method to stop coming in JSON?