|
|
|||
JSON formatting help
I have a JSON string that I need to be RECEIVED in the following format:
{"strUseExtID":"false","strObject":"Deal_Support_Requests__c","strAction":"Insert","strDSRLIST":"[{\"Account__c\":\"0016000000G0kWfAAJ\",\"Name\":\"DSR-000001X\",\"Id\":\"a4MW000000000GhMAI\"},{\"Account__c\":\"0016000000G0kWfAAJ\",\"Name\":\"DSR-057433\",\"Id\":\"a4MW00000000GDYMA2\"}]"} In other words, my JSON string should RESULT in the string above being received by the receiving program (a JSON OF a JSON). The quotes and backslashes included. When I try to escape the quotes with more backslashes, I receive errors. I am trying to validate this through cURL so that I can properly communicate format. This is not done using Javascript, so I don't have access to all of the standard JSON methods available there. Can anyone help? 1 Reply
Almost there - you only need to double quote the object key pairs. it should look like this:
{"strUseExtID":"false","strObject":"Deal_Support_Requests__c","strAction":"Insert","strDSRLIST":[{"Account__c":"0016000000G0kWfAAJ","Name":"DSR-000001X","Id":"a4MW000000000GhMAI"},{"Account__c":"0016000000G0kWfAAJ","Name":"DSR-057433","Id":"a4MW00000000GDYMA2"}]} |
|||
|