user3658609
user3658609

Reputation: 559

Using local json file in Android

I will be using a local JSON file with some data. My question is where is the best/proper way to store the file and how should I access it and it's contents?

I have worked with json through http before but not a local one.

Upvotes: 39

Views: 39096

Answers (1)

ranjk89
ranjk89

Reputation: 1580

There are so many ways,

For basic JSON parsing, Android's in-built JSONObject should work - https://developer.android.com/reference/org/json/JSONObject.html

For more advanced JSON parsing (json-java mapping), you can look at GSON library - https://code.google.com/p/google-gson/

Upvotes: 47

Related Questions