Print Table In Bot emulator whose fields contain class object values - json

I want to print a table in Bot Emulator. The table contains values from a class object. What is the best way to do it?
I tried to do it using Adaptive card but I am stuck in printing variable values( class objects) as I cannot pass the objects parameter to my Json file made for adaptive card.

Two-column tables can be included in Adaptive Cards as fact sets.
If you need more than two columns, just make each row in your table its own column set.

Pretty sure your best approach might be using Adaptive cards, it shouldn't be that hard to load your card's properties before sending it as attachment as it's shown in MBF docs:
.NET: Add rich cards: Adaptive card
Node.js: Send rich cards: Send an Adaptive Card
Both links shows you how to send an adaptive card, using that, you may be able to create methods that parse your object to card's properties

Related

Can i add dynamic input in Input.ChoiceSet in msteams adaptive card? I am getting values from an api call and want to list as an input

I am getting some data from an API call and I want to display them in an adaptive card as a choice set, then the user will be able to choose one or more choices to do action on them. The problem is that the array of choices is dynamic. My question is how to pass an array to the choice set in the adaptive card. Statically i can do. Since its dynamic, I tried via choices.data, but in vain
That is not possible as such, the card is static and can't "retrieve" data.
You have to pass all available choices into the JSON payload of the card.
In MS Teams however you can do this in multiple steps.
In the first card the user selects the first option and submits the card.
Then you can send a second card with choices according to the first card.
To my knowledge that's the only way to achieve what you want currently

How to Display All the Images from Json Data into Carousal using Flutter

I have an Json API which has set of Data along with Multiple Images, I would like to Create an Carousal and Display all the images from the json data in flutter
You can use carousel_slider for carousel and for images u can use Image.network or Cached network image
You should always try to include in your question what you have already attempted and what specific problems you're facing, however it's quite a straightforward answer so here's the gist of how to do it.
You can get your raw API data using the http package and a get request. Once you have this, you can decode it using jsonDecode(String data), which returns a Map<String, dynamic>. You can then select the list field as in any map object (jsonMap['images']) and use the list .map method to create a list of Image.network widgets to use as the children in you carousel package of choice (or build your own).

Dynamic data Binding in Adaptive cards

I am looking for a way where I can bind the dropdowns used in adaptive cards with the data that I will get from my API.
Anyone know how to use https get calls in adaptive cards to prefill data.
Thanks
I'm pretty sure you can't do -inside- the card itself (i.e. from the user's bot client), but it's easy enough to dynamically create the card -before- you send it to the user. There are 3 ways I know of to do this:
1) you can compose the json string for the card yourself, and build up the dynamic options
2) you can using a strongly-typed library to create the card, and build the options dynamically in code (e.g. if you're using C#, you can use this nuget package.
3) you can look at the new adaptive card templating (currently in preview).
I discuss these options more over here: Display number in adaptive card

YouTube REST client with Delphi

I am developing a rest client that fetched data from YouTube using their API. When a REST request is completed I am putting the data in a Memory Table component and then make it display in a grid.
The REST request etc. works fine, I am getting data back, however, the data that is set in items (field snippet) is JSON encoded and obvious shows as JSON encoded string in the grid (column snippet).
Is there a way so I can display the data as expected, hence get the data that is stored inside items -> snippets to display in the grid or memory table?
One way I could think of is to go trough the memory table, parse the data and insert it into another memory table to display the data correctly...but I think there must be an easier way to do it.
Below a screenshot from the REST Debugger, the data is displayed the same in the grid / memory table. What I would need is to get the data from the snippet column to display correctly in the grid / memory table.
To process the REST request I am using the standard Delphi components such as RESTClient, RESTRequest, RESTResponse, etc.
I've tried to change the root element to snippets and items/snippets but these give an error saying something in the line that it can not be added because it does not exist as a root element.

Populating grid and form with same json?

Is it possible to populate grid with some of the JSON data and a form with other, from the same JSON? Two stores or two models or both? simple example... ;-)
Yes, the best way to do this would be to manipulate the reader, which as well as returning records, also stores whatever the raw json sent from the server is.
The easiest solution would be to specify the reader parameters for your grid, but then have a listener on the store, which then processed the rawData property from the reader to get the additional values for your form.
Of course if your form data is related to the grid data, you may do better to rely on nested loading and form.loadRecord in the store's load event handler. See the Ext samples (form and grid data binding example) for wasy of doing this.
Depending on the circumstances, another approach similar to the Ext FAQ would be to handle the Ajax through a simple Ext.Ajax.Request, and this process the json through two stores with local proxies, but this doesn't seem quite so Ext4 data model friendly to me.