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

Community site session details

Session Id :
Power Automate
Unanswered

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
    Parsing json failed
    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
    Parsing json failed
    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…

Ajay Kumar Gannamaneni – Community Spotlight

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

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard