0

What would be the best way to populate text views with information stored in a JSON file? Is there a way to access the data by the name of the fields?

For instance, I have this JSON file

{
    "Weapons":
    {
        "Ranged":
        [
            {
                "name": "Bow",
                "desc" : "This is a bow"
            },
            {
                "name": "Crossbow",
                "desc" : "This is a crossbow"
            }

        ]   
    }
}

Is it possible to access these object by their name and load in the description based on that name?

Ashlee Berry
  • 75
  • 1
  • 7

1 Answers1

0

Try this helpful tutorial Ashlee:

http://inducesmile.com/android-tutorials-for-nigerian-developer/how-to-parse-json-in-android-example/

There are also other helpful tutorials out there if you search for them, and even some good example projects.

partynose
  • 143
  • 1
  • 10