AnsweredAssumed Answered

Use spaces in Json Values of cURL call

Question asked by JamesPeragine on Jan 28, 2019
Latest reply on Jan 28, 2019 by JamesPeragine

It seems that there can not be any spaces in the json section of my cURL call.  There are fields inside escaped quotes that need to have spaces (Business Names ect.).  If I put a space in any of them it returns {"code":"INVALID_JSON","message":"An invalid JSON was specified"}.  I tried URL encode but this puts unwanted characters into the fields on the other end.


How can this be??  Is there not a way to have spaces in the fields that you want to pass?


Here is an example of my code


Let (


email = Trim(Merchants_Owners::Email);

dba = Trim( Merchants::DBA_Name);

legalname = Trim(Merchants::Legal_Name)




"-H \"Authorization: Bearer " & $AuthID & "\" -H \"Content-Type: application/json\" --data {\"fileInfos\":[{\"libraryDocumentId\":\"CBJCHBCAABAA5WDetft6Wmt_kwLnQH50MjIdEmEbci5M\"}],\"name\":\"Jim Jones\",\"participantSetsInfo\":[{\"memberInfos\":[{\"email\":\""&email&"\"}],\"order\":1,\"role\":\"SIGNER\"}],\"mergeFieldInfo\":[{\"defaultValue\":\""&dba&"\",\"fieldName\":\"BusinessDBAName\"},{\"defaultValue\":\""&legalname&"\",\"fieldName\":\"BusinessLegalName\"}],\"signatureType\":\"ESIGN\",\"state\":\"IN_PROCESS\"}"