+ Start a Discussion
anil Kumaranil Kumar 

Dynamic JSON body

Hi All,

I want prepare JSON body dynamically for all the contact fields with mask values, i have queried all the contact fileds dynamically assiged to list now i have to prepare JSON body for the fields with mask values. 
For example contact name is Anil it should returm like "Name":"True",contact Phone is null it should returm like "Phone":"False"

How to achive this in apex.

Thanks,
Anil Kumar 
anil Kumaranil Kumar
And also i would like to send all contact records in the post request as JSON body.