首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Power自动Json模式

Power自动Json模式
EN

Stack Overflow用户
提问于 2022-10-03 19:54:12
回答 2查看 190关注 0票数 0

我正在使用power自动化从Json API中提取一些Json数据。Power自动从示例查询生成架构。问题是,它生成的查询不能用于所有查询,因为它将类型设置为"string“,一些空值将出现在某些查询中。是否需要将所有类型从"string“更改为"string”、"null"?这似乎是Power应该自动为类型所做的事情。

这是错误消息的一部分。

代码语言:javascript
运行
复制
"message": "Invalid type. Expected String but got Null.", 

这是模式。

代码语言:javascript
运行
复制
{
"properties": {
    "itemsPerPage": {
        "type": "integer"
    },
    "resources": {
        "items": {
            "properties": {
                "active": {
                    "type": "boolean"
                },
                "authType": {
                    "type": "string"
                },
                "createdDate": {
                    "type": "string"
                },
                "deleteOnExpiry": {
                },
                "email": {
                    "type": "string"
                },
                "emailChangePending": {
                    "type": "boolean"
                },
                "expiryDate": {
                },
                "externalId": {
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
                "idpUserId": {
                    "type": "string"
                },
                "isServiceAccount": {
                    "type": "boolean"
                },
                "lastActiveDate": {
                    "type": "string"
                },
                "lastModificationDate": {
                    "type": "string"
                },
                "locked": {
                    "type": "boolean"
                },
                "name": {
                    "properties": {
                        "familyName": {
                            "type": "string"
                        },
                        "formatted": {
                            "type": "string"
                        },
                        "givenName": {
                            "type": "string"
                        }
                    },
                    "type": "object"
                },
                "role": {
                    "type": "string"
                },
                "userName": {
                    "type": "string"
                },
                "userPrincipalName": {
                },
                "userType": {
                    "type": "string"
                }
            },
            "required": [
                "id",
                "userName",
                "externalId",
                "email",
                "name",
                "active",
                "locked",
                "emailChangePending",
                "authType",
                "userType",
                "role",
                "idpUserId",
                "userPrincipalName",
                "expiryDate",
                "deleteOnExpiry",
                "createdDate",
                "lastModificationDate",
                "lastActiveDate",
                "isServiceAccount"
            ],
            "type": "object"
        },
        "type": "array"
    },
    "startIndex": {
        "type": "integer"
    },
    "totalResults": {
        "type": "integer"
    }
},
"type": "object"

}

EN

Stack Overflow用户

发布于 2022-10-04 05:46:37

不久,解析json操作将能够处理空值。

这个特性预计将在本月影响通用可用性:https://learn.microsoft.com/en-gb/power-platform-release-plan/2022wave2/power-automate/parse-json-action-now-handles-null-objects

票数 0
EN
查看全部 2 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73940223

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档