Reputation: 17
I have created an application. Which gets a .JSON file from a server and reads it.
What I would like to do is to save it onto the device as a .JSON file before it actually does any reading. The reason why I would like to do this, is so you dont need to have an internet connection every time a client uses my application.
Here is an example of the JSON
{
"CARS LIST":
{
"Car":
{
"Make":"BMW",
"Model":"M3",
"Engine":"4.0",
"Desc":"M Power!",
},
"Car":
{
"Make":"Mercedes",
"Model":"SLS",
"Engine":"6.2",
"Desc":"AMG!",
}
}
}
Upvotes: 0
Views: 230
Reputation: 17
This is how I done it.
Upvotes: 0
Reputation: 543
You can save this response as a text file with timestamp in filename. This will tell you upfront when was data updated last time.
Upvotes: 1