I have an API which has the following characteristics:
Schema:
{
"type": "array",
"items": {
"type": "object",
"properties": {
"StartDate": {
"type": "string"
},
"EndDate: {
"type": "string"
},
}
}
}
**************************
Example failure payload:
{
"StartDate": "6/15/2017",
"EndDate": null,
}
Note that this works if both StartDate and EndDate are not null
The Parse JSON step with the above schema returns "Error - Expected String, received null"
Replacing the EndDate data type "string" with "any" causes it to be unreadable in following steps (as though it was never parsed) and changing it to "data" causes an internal server error.
Is there any way to create a schema which allows null values in the "Parse JSON" step?
Solved! Go to Solution.
This seems to be working:
"heat_index_f": {
"type": ["number","null"]
},
"heat_index_c": {
"type": ["number","null"]
},
Hi @ChrisCC,
I don't think there would be schema which could allow Null value.
Please consider replace the Null value with some string, or add a condition to check if the value is Null with the empty funciton.
Or you may consider submit this as an idea, to suggest add the Null support under parse JSON action.
Regards,
Michael
This seems to be working:
"heat_index_f": {
"type": ["number","null"]
},
"heat_index_c": {
"type": ["number","null"]
},
Works for any data type:
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
48 | |
18 | |
14 | |
12 | |
12 |
User | Count |
---|---|
61 | |
41 | |
24 | |
22 | |
19 |