PVA: Valid adaptive card json prevents publishing to PVA
See original GitHub issueRepro
- Create a non-PVA bot with adaptive card, test that it works.
- Create a PVA bot, switch to advanced authoring with composer
- Reproduce the adaptive card in PVA bot
- Publish
Error
"severity": "Error",
"source": "MoodCheckerDialog.en-us.lg",
"message": "Error occurred when parsing expression 'json({\r\n \"$schema\": \"http://adaptivecards.io/schemas/adaptive-card.json\",\r\n \"version\": \"1.2\",\r\n \"type\": \"AdaptiveCard\",\r\n \"body\": [\r\n {\r\n \"type\": \"Container\",\r\n \"items\": [\r\n {\r\n \"type\": \"ColumnSet\",\r\n \"columns\": [\r\n {\r\n \"type\": \"Column\",\r\n \"width\": \"auto\",\r\n \"items\": [\r\n {\r\n \"type\": \"Image\",\r\n \"url\": \"https://metatour.azurewebsites.net/img/happy.png\",\r\n \"size\": \"small\"\r\n '. missing '}' at '<EOF>'"
}
---
Sample JSON
# SendActivity_kUwtny()
[Activity
Attachments = ${SendActivity_kUwtny_attachment_fpA8bl()}
]
# SendActivity_kUwtny_attachment_fpA8bl()
> To learn more Adaptive Cards format, read the documentation at
> https://docs.microsoft.com/en-us/adaptive-cards/getting-started/bots
- \```${json({
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.2",
"type": "AdaptiveCard",
"body": [
{
"type": "Container",
"items": [
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"width": "auto",
"items": [
{
"type": "Image",
"url": "https://metatour.azurewebsites.net/img/sad.png",
"size": "small"
}
]
},
{
"type": "Column",
"width": "stretch",
"items": [
{
"type": "TextBlock",
"text": "I'm sorry to hear that. Feel better soon.",
"weight": "bolder",
"wrap": true,
"BlockElementHeight" : "stretch"
}
]
}
]
}
]
}
]
})}\```
(backslash inserted for rendering in issue comment)
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (11 by maintainers)
Top Results From Across the Web
Solved: Adaptive card shown as json in PVA instead of the
When i test the dialog in PVA, it is not displaying the adaptive card. Instead its showing it in the JSON format. Can...
Read more >Build a Trivia with me Using PVA Bot, Adaptive Cards and ...
Learn how to build PVA Bot the fun way. In this session, I will show you how to build Power Virtual Agent Bot,...
Read more >Table - Schema Explorer | Adaptive Cards
Specifies whether grid lines should be displayed. Type: boolean; Required: No, default: true. JSON Copy.
Read more >Power virtual agent Adaptive card using composer
The below PVA is a simple conversation created to capture the user information ... Add the Adaptive Card by adding the following JSON...
Read more >Displaying rich responses in Power Virtual Agent Chat bot ...
To design responses using Adaptive Cards, we need to use the Bot Framework Composer. This downloads an app that needs to be installed...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Shiproom - core P0 scenario - approved
Shiproom - approved. please merge today.