cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JAngle
Frequent Visitor

JSON schema validation errors when parsing JSON

My flow takes a JSON from powerapps. I've used the output from that to generate my schema in the Parse JSON aspect of my flow. Sadly I get an error about not being provided with the items laid out in the schema. 

 

The JSON is made up of two strings. One represents a Base64 string and the other is a general text string. I can download the input my the test results and it clearly contains the elements I want to parse. 

 

I've tweaked the schema after reading some blogs but to no avail: http://johnliu.net/blog/2018/6/a-thesis-on-the-parse-json-action-in-microsoft-flow

 

My error:

[
{
"message": "Required properties are missing from object: ItemID.",
"lineNumber": 0,
"linePosition": 0,
"path": "[0]",
"value": [
"CmrImg"
],
"schemaId": "#/items",
"errorType": "required",
"childErrors": []
},
{
"message": "Required properties are missing from object: CmrImg.",
"lineNumber": 0,
"linePosition": 0,
"path": "[1]",
"value": [
"CmrImg"
],
"schemaId": "#/items",
"errorType": "required",
"childErrors": []
},
{
"message": "Required properties are missing from object: ItemID.",
"lineNumber": 0,
"linePosition": 0,
"path": "[2]",
"value": [
"CmrImg"
],
"schemaId": "#/items",
"errorType": "required",
"childErrors": []
},
{
"message": "Required properties are missing from object: CmrImg.",
"lineNumber": 0,
"linePosition": 0,
"path": "[3]",
"value": [
"CmrImg"
],
"schemaId": "#/items",
"errorType": "required",
"childErrors": []
},
{
"message": "Required properties are missing from object: ItemID.",
"lineNumber": 0,
"linePosition": 0,
"path": "[4]",
"value": [
"CmrImg"
],
"schemaId": "#/items",
"errorType": "required",
"childErrors": []
},
{
"message": "Required properties are missing from object: CmrImg.",
"lineNumber": 0,
"linePosition": 0,
"path": "[5]",
"value": [
"CmrImg"
],
"schemaId": "#/items",
"errorType": "required",
"childErrors": []
}
]
1 REPLY 1
Pstork1
Dual Super User
Dual Super User

One of the issues I ran into recently with Parse JSON was dealing with values or properties that were Null.  When I used the sample output to get the schema it automatically set the type to "string", but it needed to be {"type": ["string", "null"]} instead.  It was still a string value, but if it was missing the JSON still parsed correctly.  I'm wondering if your required properties are the same kind of problem.



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

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (1,833)