Would it be possible to develop a custom Nintex workflow action to accept in a JSON string and output a collection? I'm aware of all of the issues involved with parsing JSON and am cool with that but am more interested to know if/how possible to have a custom action set a collection variable. I didn't see anything in the SDK about returning collection variables.
Thanks in advance,
Solved! Go to Solution.
it's definitely do-able. You're output just needs to be a C# array that your action will have access to.
In your Execute function, just check the variable types, especially the ResultOutput or whatever you call it and you'll see that it contains an array. You will then able to have your JSON parser code, update/add to the array.
I am new to nintex workflow trying it out to see if it fits our organisation. We have a few "external" REST services that we would want to call in SharePoint and they all return JSON data. May I ask about this: "I'm aware of all of the issues involved with parsing JSON" highlighted in the original post. Can i parse the JSON data returned from a "Web Request" action and how do I do that?
Thanks for these prompt responses. I am not quite sure if RegEx would be accurate to use on a non-regular language (JSON). Are these some of the issues that the original poster was talking about? Is RegEx the ONLY way at the moment?
Yes I think it's the only way. Maybe you can use string functions (Substring, Replace, Remove...) but I think it's less easy and practical to use than the regular expression to manipulate JSON format.