You need to sign in to do that
Don't have an account?
chikku
How to create JSON Generator with apex?
I'm new to Apex. I have JSON data I need to convert to JSON Generator.
Can you please help me out?
Can you please help me out?
Contact app = [select Id, Name from Contact ]; { "CustomerID": 0, "CustomerType": 1, "Name": "callum, john", (app.Name,app.LastName) like this i need in JSON Generator. "BranchID": 1, "CustomerAddress": [ { "CustomerAddressID": 0, "CustomerID": 0, "Address": { "Address1": "Test", "TownCityID": 41037, "CountyID": null, "StateID": 41036, "CountryID": 4, "Country": "Australia" }, "AddressTypeID": 1, "DateMovedIn": "11/09/2019", "IsPrimary": false } ], "Persons": [ { "PersonID": 0, "Title": 1, "Gender": 0, "ForenamePartOne": "callum", "ForenamePartTwo": null, "ForenamePartThree": null, "Surname": "john", "DateOfBirth": "11/09/1970", "SocialSecurityNumber": "35", "telephone1": "", "telephone2": "", "telephone3": "6598307315" } ], "CorrespondenceName": "callum, john", "DateJoined": "11/09/2019" }
https://www.adminbooster.com/tool/json2apex
https://json2apex.herokuapp.com/
Please mark as Best Answer if above information was helpful.
Thanks,
You can use the below tool:-https://json2apex.github.io/
Please mark it as Best Answer if it helps you.
Thanks & Regards
Suraj Tripathi