i am trying to get data from api and save it in assets folder as a .json file so i can access it later.
the data i am getting from api is
[
{
"category" : "Top News",
"data" : [
{
"title" : "Nashville Season 5 Premiere Set at CMT",
"image_url" : "http://ia.media-imdb.com/images/M/MV5BMjA2NTE0NzkyMF5BMl5BanBnXkFtZTgwMjAwMzg5NjE@._V1._SY140_.jpg",
"caption" : "The cancelled ABC country-music drama will make its CMT debut with a two-hour premiere on Thursday, January 5, at 9/8c, the cable network announced Wednesday",
"time" : "1 hours ago"
},
{
"title" : "Sarah Paulson Joins Ryan Murphy's FX Drama Feud as Geraldine Page",
"image_url" : "http://ia.media-imdb.com/images/M/MV5BMTUzMTA3NjM4MV5BMl5BanBnXkFtZTcwNjk1NTAyMg@@._V1._SY140_.jpg",
"caption" : "Ryan Murphy is taking a page from his successful playbook, casting frequent collaborator Sarah Paulson in his new FX anthology drama Feud.",
"time" : "2 hours ago"
},
{
"title" : "Ronald Reagan Biopic Draws ‘Soul Surfer’ Director Sean McNamara",
"image_url" : "http://ia.media-imdb.com/images/M/MV5BMzEzOTk4OTQ2OF5BMl5BanBnXkFtZTYwMzkyODQ2._V1._SY140_.jpg",
"caption" : "\"Soul Surfer\" Sean McNamara has signed to helm a Ronald Reagan biopic that’s set to start production next spring.",
"time" : "3 hours ago"
},
{
"title" : "Martin Lawrence Gets First Stand-Up Special in 14 Years at Showtime",
"image_url" : "http://ia.media-imdb.com/images/M/MV5BMTczOTMwOTc1OF5BMl5BanBnXkFtZTgwNTc3MjY5NzE@._V1._SY140_.jpg",
"caption" : "Martin Lawrence‘s first stand-up special in 14 years will air on Showtime next month, the network announced on Tuesday.",
"time" : "10 hours ago"
},
{
"title" : "Cmt Announces ‘Nashville’ Season 5 Premiere Date",
"image_url" : "http://ia.media-imdb.com/images/M/MV5BMjgwMzg2ODgtZTkzYi00YTU0LThhYjMtMWM0Zjc0ZGFhMDViXkEyXkFqcGdeQXVyNjQxMDY5MjM@._V1._SY140_.jpg",
"caption" : "\"Nashville\" is heading back to TV with a new network, new showrunners and a new year",
"time" : "13 hours ago"
}
]
}
i want to save this data in a .json file. how can I do this?? this is the result i want to create if their is any other way plz guide me i am doing this in card view in expandible list view.any help would be grateful