So the objective is to create a visualforce page form that creates a JSON for HTTP post method. I was wondering what was the best way to go about this.
'{"listingAction":"sale","propertyDetails":{"propertyType":["house"],"bedRooms":5,"bathRooms":5,"address":{"displayOption":"fullAddress","state":"vic","streetNumber":"690","street":"Nankoorstreet","suburb":"Bendigo","postcode":"3555"},"area":{"unit":"squareMetres","value":100}},"contacts":[{"domainAgentId":"234567","domainAgencyId":"11111","firstName":"Michael","lastName":"Cuming","phone":"0455287262","fax":"0282828282","mobile":"04557829292","email":"[email protected]","receiveEmails":true}],"providerAdId":"providerId123","DomainAgencyID":"36111","description":"Created in salesforce.","summary":"Listingsummaryhere","price":{"from":1000000,"to":1100000},"auction":{"dateTime":"2020-01-28T10:30Z","location":"Onsite"},"inspectionDetails":{"inspections":[{"from":"2020-01-14T10:30Z","to":"2020-01-14T11:00Z"},{"from":"2020-01-21T10:30Z","to":"2020-01-21T11:00Z"}]}}'
this is the json body it is expecting, Any help getting me closer to a solution would be amazing.. I was reading maybe JSONGenerator would be the way to go. but this is a first for me so any tips would be greatly appreciated.