How to fetch data from a JSON file in Android Studio


I am trying to make an app showing info from an API. I have searched everywhere but I didn’t find an answer that solve my problem!
Here is an example from the JSON file:

"status": 200,
"data": {
    "date": "2018-10-12T00:00:00.000Z",
    "featured": [
            "id": "5bbdc3abdf819b65ea6b733b",
            "name": "Name",
            "price": "1",
            "priceIcon": "priceicon",
            "priceIconLink": "price.png",
            "images": {
                "icon": "icon.png",
                "png": false,
                "gallery": false,
                "featured": false
            "rarity": "rarity",
            "type": "type",
            "readableType": "Type"

How can I fetch the name, price, icon, rarity and readableType?

Please don’t mark it as duplicate because I haven’t found the answer that I am searching for.


Check this tutorial, no one is going to code it for you, also your question has been made 10000 times

Answered By – Joaquín

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published