Display JSOn data in a list view

What I’m trying to do:

Hi All,

I am a newbie still exploring the potential of Anvil. I am thinking of building a moblie client that will get data from a database REST API, and then display it in a list view. So far my understanding of Anvil is that this get/post work would be done in a server module, right? Now suppose I manage to get a JSON response into the server module, should it be stored into the database first before the client code can access it? or can the JSON be taken directly to be displayed in the client?

Thank you for answering in advance,

Pt

What I’ve tried and what’s not working:

Code Sample:

# this is a formatted code snippet.
# paste your code between ``` 

Clone link:
share a copy of your app

Forgive me for missing the bit in the documentation. Now I got it:

" If the json parameter is set to True , a JSON-decoded object will be returned."

So the response is directly mapped into objects, right?

1 Like

Yes, the response is converted to objects automatically with that parameter. Generally either a dictionary or a list of dictionaries. You can return whatever that result is directly to the client.

Thank you very much!