+ Start a Discussion
VRKVRK 

need create http get from complex json , i need cast http response with apex.class of the json

Hi all,
pls find my requirment below :

Required to  create http get from complex json  &   cast http response with apex.class of the json
if anyone have scenarios / code pls share

Thanks
VRK
 
SwethaSwetha (Salesforce Developers) 
HI VRK,
Are you looking to create apex from JSON? If so, try https://json2apex.herokuapp.com/ . This tool will help generate strongly typed Apex code for parsing a JSON structure

Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you
VRKVRK
No..this is alrady i know
my requirment is :
{
  "Emp": {
    "Id": "a1K36000",
    "empName": {
      "value": "Life"
    },
    "empAge": {
      "value": " 40"
    },
    "Address": null,
  },
  "Manager": {
    "arrangementNumber": "S03434555",
    "payrollBenefit": {
      "value": "11"
    },
    "endOfEnrollment": "06/17/2020", 
    "isGIPolicyType": "YES",  
    "planType": {
      "value": " Issue"
    },
    "isSelect": "YES", 
    "totalNumber": 0 
  },
  
  My requirement is :
  In RestExplorer, Get Method, When i pass below
URL # /services/apexrest/partyInquiry?recordId=a1K2F000000Wsom 
  I can get Results below Structure :
  
  EmpInfo
   --Id : a1K36000
     empName:Life
     empAge  : 40
     Address : null
 Manager 
    arrangementNumber: S03434555,
    payrollBenefit: : 11
    endOfEnrollment: "06/17/2020, 
    isGIPolicyType: "YES,  
    planType:  Issue
Thanks
VRK