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 / Passing parameter as J...
Power Apps
Unanswered

Passing parameter as JSON object

(0) ShareShare
ReportReport
Posted on by 9

 

As the title suggests I am attempting to pass JSON content through a parameter. I understand that this feature might not be implemented since, although I can define a parameter in Swagger, it does not appear outside the Swagger Editor with string parameters.

 

Here is my parameter schema:

 

 in: body
 schema:
 type: object
 properties:
 field_40: {type: object, description: Address}

 

 

Here is the content for field_40:

 

{
 "latitude": "-32.7",
 "longitude": "151.6",
 "street": "Street",
 "city": "City,
 "state": "State",
 "country": "Country",
 "zip": "3257"
}

 

 

This is the result of my field as it is wrapped in string tags:

 

"field_40_raw": "{\"latitude\":\"-32.7\",\"longitude\":\"151.6\",\"street\":\"Street\",\"city\":\"City\",\"state\":\"State\",\"country\":\"Country\",\"zip\":\"3257\"}",

 

 

If I attempt to remove the string tag manually I receive this error:

 

{
 "error": {
 "code": 500,
 "message": "Unable to parse body as JObject.",

 

 

I understand that it may not be possible to accomplish what I am attempting, however, I did notice that much of the Policy Template documentation seems to imply that you can modify the JSON content of parameters. If this is possible then surely it must be possible to send the data as a JSON object.

Categories:
I have the same question (0)
  • Verified answer
    hq220 Profile Picture
    9 on at

    I solved the problem.

     

    Turns out the Test tab does not accept objects as an example.

     

    However, the live version does. I went into my flow and saved a new version after changing the parameter type in the Swagger editor to object, it then started to accept JSON objects.

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard