VMware Cloud Community
jarushepic
Enthusiast
Enthusiast

Azure Partner Portal & Resource Manager Integration with vRO

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?

Tags (2)
0 Kudos
2 Replies
iiliev
VMware Employee
VMware Employee

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?

0 Kudos
jarushepic
Enthusiast
Enthusiast

Partner Portal - List Customers

0 Kudos