Make sure your saved JSON string includes the full Adaptive Card structure, for example:
{
"type": "AdaptiveCard",
"$schema": "https://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.4",
"body": [
{
"type": "Container",
"style": "emphasis",
"spacing": "None",
"bleed": true,
"items": [
{
"type": "Image",
"url": "https://example.com/yourimage.png",
"size": "Stretch",
"altText": "Header"
}
]
},
{
"type": "Input.ChoiceSet",
"id": "leaveType",
"label": "Leave request",
"style": "compact",
"isMultiSelect": false,
"placeholder": "Select an option",
"choices": [
{ "title": "Sick Leave", "value": "sick" },
{ "title": "Vacation Leave", "value": "vacation" },
{ "title": "Personal Leave", "value": "personal" }
]
},
{
"type": "Input.ChoiceSet",
"id": "approval",
"label": "Approve leave?",
"style": "expanded",
"isMultiSelect": false,
"choices": [
{ "title": "Yes", "value": "yes" },
{ "title": "No", "value": "no" }
]
}
],
"actions": [
{
"type": "Action.Submit",
"title": "Approve",
"style": "positive",
"data": { "action": "approve" }
},
{
"type": "Action.Submit",
"title": "Reject",
"style": "destructive",
"data": { "action": "reject" }
}
]
}
Store this entire JSON string in your cardJson variable or data source. Use ParseJson(Topic.cardJson) to convert it into a JSON object that the Adaptive Card control can render.