I am using "Web-Request" Action, to initiate a REST query of type "application\json".
In the Body section, I need to PASS XML content within the JSON request. What is the best way to do it?
My Final JSON should look like this
content="Your content goes here"
fontFamilyName="Times New Roman"
If, I pass the JSON as it the web-service as it is, it does not work. It seems that Nintex does not like "white spaces" in the XML/JSON. Removing with spaces in XML can be tricky.
I got to know that we have a BUG in Nintex and also discovered workaround for passing JSON in webservice action. https://community.nintex.com/thread/13842-build-string-json-and-workflow-variables-not-working.
However, now I need to PASS XML with a JSON and I need to understand the best way to move forward.
Note: Normal REST query with JSON works fine, If I use an external client like ARC(https://chrome.google.com/webstore/detail/advanced-rest-client/hgmloofddffdnphfgcellkdfbfbjeloo) the REST query completes with the above JSON.nintexworkflows office365#web-request
Solved! Go to Solution.
I don't think this is a Nintex Workflow specific question, you need to escape your (XML) quotation marks when you embed it in a string. Try putting a backslash in front of each.
You also have an extra comma before the ‘}’, which is not valid.
Then there is the issue of line breaks in the middle of your xml, you can’t just open a string (“) and then put line breaks in them
Have a look at online JSON validators before even trying to pass it into Nintex.