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"]
},
Check out new user group experience and if you are a leader please create your group
See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.
User | Count |
---|---|
40 | |
10 | |
8 | |
7 | |
7 |
User | Count |
---|---|
62 | |
22 | |
12 | |
11 | |
11 |