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 Automate
Answered

Parsing json failed

(0) ShareShare
ReportReport
Posted on by 8
Hi,
 
Can anyone help me with a problem parsing json?
I am using an HTTP module to call an endpoint in the Confluence cloud. The response is in json. I need to find all the page IDs and titles. So I want to parse json using the Parse JSON module. And even when I use the response as a pattern for json schema, I still get an error that the schema validation failed.
 
I went through the steps that Copilot recommended to me and manually changed the types in the schema but now I am stuck with the type "results". I have used array, object and string but nothing has worked.
Also Copilot is quite unsure - when I use "array" it recommends "object", when I use "object" it recommends "array".
 
Does anyone know what I am doing wrong?
 
The schema and response are attached.
 
Categories:
I have the same question (0)
  • Verified answer
    Gyllentid Profile Picture
    894 on at
    Hello,
    The old designer gives much better error message why the schema fails. I found, using your payload that the generated json schema had issues with fields either being string or null. ParentType and ParentId both can be either of type string or null.
     
    You can amend them: 
    "parentType": {
                            "type": ["string","null"]
    "parentId": {
                            "type": ["string","null"]
     
    I had success using this schema: 
     
    {
        "type": "object",
        "properties": {
            "results": {
                "type": "array",
                "items": {
                    "type": "object",
                    "properties": {
                        "parentType": {
                            "type": ["string","null"]
                        },
                        "parentId": {
                            "type": ["string","null"]
                        },
                        "spaceId": {
                            "type": "string"
                        },
                        "ownerId": {
                            "type": "string"
                        },
                        "lastOwnerId": {},
                        "createdAt": {
                            "type": "string"
                        },
                        "authorId": {
                            "type": "string"
                        },
                        "version": {
                            "type": "object",
                            "properties": {
                                "number": {
                                    "type": "integer"
                                },
                                "message": {
                                    "type": "string"
                                },
                                "minorEdit": {
                                    "type": "boolean"
                                },
                                "authorId": {
                                    "type": "string"
                                },
                                "createdAt": {
                                    "type": "string"
                                }
                            }
                        },
                        "position": {
                            "type": "integer"
                        },
                        "body": {
                            "type": "object",
                            "properties": {}
                        },
                        "status": {
                            "type": "string"
                        },
                        "title": {
                            "type": "string"
                        },
                        "id": {
                            "type": "string"
                        },
                        "_links": {
                            "type": "object",
                            "properties": {
                                "editui": {
                                    "type": "string"
                                },
                                "webui": {
                                    "type": "string"
                                },
                                "edituiv2": {
                                    "type": "string"
                                },
                                "tinyui": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "required": [
                        "parentType",
                        "parentId",
                        "spaceId",
                        "ownerId",
                        "lastOwnerId",
                        "createdAt",
                        "authorId",
                        "version",
                        "position",
                        "body",
                        "status",
                        "title",
                        "id",
                        "_links"
                    ]
                }
            },
            "_links": {
                "type": "object",
                "properties": {
                    "base": {
                        "type": "string"
                    }
                }
            }
        }
    }
  • Libor Profile Picture
    8 on at
    Excellent,
     
    thank you for the quick reply and for the solution.
    I changed both types as you described and now it works as I wanted.
     
    Have a nice day
    Libor

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…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 248 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 207 Super User 2026 Season 1

#3
Power Platform 1919 Profile Picture

Power Platform 1919 101 Super User 2026 Season 1

Last 30 days Overall leaderboard