Power-BI-Read-Only-REST-API icon indicating copy to clipboard operation
Power-BI-Read-Only-REST-API copied to clipboard

json parsing issue

Open thmere opened this issue 3 years ago • 2 comments
trafficstars

on the call getInfo endpoint I am hitting an error that it cannot parse the json

"message": "Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'System.Guid' because the type requires a JSON primitive value (e.g. string, number, boolean, null) to deserialize correctly.\r\nTo fix this error either change the JSON to a JSON primitive value (e.g. string, number, boolean, null) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List<T>) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object.\r\nPath 'workspaces[0].id', line 1, position 22.", "target": "requiredWorkspaces.workspaces[0].id"

the json array is coming out like this: "workspaces": [{"id":"6c0d5435-11d1-4cb3-83df-0a7d69f781fb",{"id":"699d67ca-416d-46f7-bf2f-c521e4fa28ff",{"id":"047e62c3-8d64-4384-80bc-4e1e5278864e"

I'm not sure where to force something like the jsonobjectattribute and I haven't changed any of the power automate steps. I'm not very familiar with json at all any help would be appreciated.

thmere avatar Nov 06 '22 01:11 thmere

I have uploaded a new version of the Flow. The approach has changed. It will now create as many JSON files in SharePoint as there are batches of workspaces. The JSON array issue should be solved.

ferrybouwman avatar Nov 08 '22 13:11 ferrybouwman

thank you! we so appreciate you, I keep getting an error when I try to upload the new flow into our environment I'm hoping our admins can sort it out as we can't wait to test it.

thmere avatar Nov 08 '22 14:11 thmere