I'm trying to create a new campaign via the CC API through:
https://api.constantcontact.com/v2/emailmarketing/campaigns
I find I have to "flatten" the JSON I send so there are no line breaks in it anywhere, and then it posts correctly.
But how do I preserve line breaks in the text_content part of the email if I have to flatten the JSON that contains that part...and flatten the text_content as a result too?
Thanks for your help!
Solved! Go to Solution.
You can use the ASCII encoding for line breaks (\n) which is reserved in JSON as a line break. For other reserved JSON characters, see this website: http://json.org/
You can use the ASCII encoding for line breaks (\n) which is reserved in JSON as a line break. For other reserved JSON characters, see this website: http://json.org/
Thanks, David!
The holidays have come and gone. For many seasonal businesses, this means the rush of shoppers has decreased as well. Instead of turning off the lights and waiting for spring, make your email marketi...
See Article