cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Custom connector unable to process json correctly that contains array of objects of array of objects

Hello,

 

I'm trying to create an action for an api for my custom connector and when I import from sample for the request or response, it was unable to process all the properties as some was missing.

 

The ones that are missing have a structure of 'array of objects of array of objects'

 

I have pasted the problematic json below

 

 

    "ConsentFields": [
        {
            "Fields": [
                {
                    "Key": "TEXT",
                    "Value": "Your consent text goes here."
                },
                {
                    "Key": "DATETIMECONSENTED",
                    "Value": "2020-01-01T09:40:18.527Z"
                },
                {
                    "Key": "URL",
                    "Value": "http://www.example.com/signup"
                },
                {
                    "Key": "IPADDRESS",
                    "Value": "127.0.0.1"
                },
                {
                    "Key": "USERAGENT",
                    "Value": "Mozilla/5.0 (X11; OpenBSD i386) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36"
                }
            ]
        },
        {
            "Fields": [
                {
                    "Key": "TEXT",
                    "Value": "Your consent text goes here."
                },
                {
                    "Key": "DATETIMECONSENTED",
                    "Value": "2020-01-01T09:40:18.527Z"
                },
                {
                    "Key": "URL",
                    "Value": "http://www.example.com/signup"
                },
                {
                    "Key": "IPADDRESS",
                    "Value": "127.0.0.1"
                },
                {
                    "Key": "USERAGENT",
                    "Value": "Mozilla/5.0 (X11; OpenBSD i386) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36"
                }
            ]
        }
    ]

 

 

How can I import this json correctly to the request and response section?

Thanks.

2 REPLIES 2
Highlighted
Super User II
Super User II

Re: Custom connector unable to process json correctly that contains array of objects of array of objects

Hi @WilsonWan 

 

I think I already answered this question elsewhere.

 

Your JSON is incorrect. You need to include a { before and a } after to make it valid.

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Cheers
Manuel

Highlighted
Regular Visitor

Re: Custom connector unable to process json correctly that contains array of objects of array of objects

Hello @manuelstgomes ,

 

I thought this post was deleted as I couldn't find it.

Unfortunately, no, the issue isn't because they weren't enclosed.

 

I have enclosed them when supplying the json to the custom connector action.

 

 

Helpful resources

Announcements
FirstImage

Microsoft Ignite 2020

Check out the announcement of Power Platform content at Microsoft Ignite!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Users online (7,181)