Haven't found anything out there, so before I write a slew of workflows to turn the MS REST calls into vRO workflows, figured I'd just ask - anyone have these workflows already built?
If not, anyone know how I can convert the json-like data returned into actual JSON? I'm trying to do a JSON.parse(content) on it and getting invalid JSON. I get something like this back:
"totalCount": 11, "items": [{item 1},{item 2}],...],"links": {"self":{"url":/customers?size=20","method"="GET","headers":[]}},"attributes":{"objectType":"Collection"})
If I just take the array for items, that parses out into the things I want and is valid JSON. Looks like MS is adding in a bunch of stuff about my request into the return value. Is this some format that javascript can somehow parse into valid JSON or do I really need to string parse that thing manually to pull out the "items" array?
The fragment you posted is indeed invalid JSON. Have you edited it by hand?
It has unbalanced pairs of quotes and parentheses. The equal sign in "method"="GET" should be a colon, the value of "url" lacks the opening double quote, there is a strange closing parenthesis at the end (instead of opening/closing braces around the whole data).
So it is very close to a valid parseable JSON, with just a few invalid characters here and there. Out of curiosity, which Azure call returns such wrongly-formatted data?
Partner Portal - List Customers