web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Custom connector error...
Power Apps
Unanswered

Custom connector error "JSON parsing error, excepted 'string' but got 'object'."

(0) ShareShare
ReportReport
Posted on by 9
  • My first Power Apps show an error when getting data from my custom connector:

         JSON parsing errorJSON parsing error

 

  •  My code in Power Apps button click:

         Code in Power Apps button ClickCode in Power Apps button Click

  • My custom connector was built with Web API, and these code from my action:

        Code in Web API ActionCode in Web API Action

 

All code above is simple, and I find a similar question with a reply by 'Solution Supplier', he suggests questioner to use the flow instead of directly executing:

     https://powerusers.microsoft.com/t5/Building-Power-Apps/Custom-connector-error-quot-JSON-parsing-error-expected-object/m-p/1340566 

 

Should I also use this method to solve my error?

   

 

 

 

 

Categories:
I have the same question (0)
  • Verified answer
    victorcp Profile Picture
    2,350 Moderator on at

    Hi,

    Looks like it is not necessary to use the ParseJson function because the custom connector already parse it to you, so try this:

    Set(
    WeatherObj,
    LocalWebAPI.CallLocalAPI()
    );
    

     

    Please let me know if it worked, if not please share the error

  • EA_ITEngineer Profile Picture
    9 on at

    Hi @victorcp ,

    I have adopted your code, but Power apps still shows the same error.

    • On the other Hand, I can't call the fields (such as, Date) of the WeatherObj without using the ParseJson function.

              I guess the ParseJson function which looks like the var keywork in C# converts a json string to be an untyped               object,  so I can call some fields of the 'WeatherObj', just like the picture as followed:

            

              new error without using ParseJson functionnew error without using ParseJson function

     

    • Additionally, my custom connector settings as followed:

          Custom Connector SettingCustom Connector Setting

     

    Thanks        

     

  • EA_ITEngineer Profile Picture
    9 on at

    Hi @victorcp,

    I have found lack of type setting in my custom connector ,  so your suggestion do work after I complete setting.

     

    Thanks.

  • EA_ITEngineer Profile Picture
    9 on at

    Attach new settings:

     

    completed setting of custom connectorcompleted setting of custom connector

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 793 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard