Member 13358124 Ответов: 1

Отсортировать каждую часть под "идентификатором"в формате JSON


Я хочу получить строки под каждым "идентификатором:"
Я использую vb 2010
Помогите мне, пожалуйста....



{"status":"ok","status_message":"Query was successful","data":
{"movie_count":10826,"limit":20,"page_number":2,"movies":[{"id":2862,"url":"https:\/\/yts.lt\/movie\/starwars-episode-v-the-empire-strikes-back-1980","imdb_code":"tt0080684","title":"Star Wars: Episode V - The
Empire Strikes Back","title_english":"Star Wars: Episode V - The Empire Strikes Back","title_long":"Star
Wars: Episode V - The Empire Strikes Back (1980)","slug":"star-wars-episode-v-the-empire-strikes-back1980","year":1980,"rating":8.7,"runtime":124,"genres":["Action","Adventure","Fantasy","SciFi"],"summary":"Luke Skywalker, Han Solo, Princess Leia and Chewbacca face attack by the Imperial forces and
its AT-AT walkers on the ice planet Hoth. While Han and Leia escape in the Millennium Falcon, Luke travels to
Dagobah in search of Yoda. Only with the Jedi Master's help will Luke survive when the Dark Side of the Force
beckons him into the ultimate duel with Darth Vader.","description_full":"Luke Skywalker, Han Solo, Princess
Leia and Chewbacca face attack by the Imperial forces and its AT-AT walkers on the ice planet Hoth. While Han
and Leia escape in the Millennium Falcon, Luke travels to Dagobah in search of Yoda. Only with the Jedi
Master's help will Luke survive when the Dark Side of the Force beckons him into the ultimate duel with Darth
Vader.","synopsis":"Luke Skywalker, Han Solo, Princess Leia and Chewbacca face attack by the Imperial forces
and its AT-AT walkers on the ice planet Hoth. While Han and Leia escape in the Millennium Falcon, Luke
travels to Dagobah in search of Yoda. Only with the Jedi Master's help will Luke survive when the Dark Side
of the Force beckons him into the ultimate duel with Darth
Vader.","yt_trailer_code":"KwYa7UpoWtM","language":"English","mpa_rating":"PG","background_image":"https:\/\/
yts.lt\/assets\/images\/movies\/Star_Wars_Episode_V_The_Empire_Strikes_Back_1980\/background.jpg","background
_image_original":"https:\/\/yts.lt\/assets\/images\/movies\/Star_Wars_Episode_V_The_Empire_Strikes_Back_1980\
/background.jpg","small_cover_image":"https:\/\/yts.lt\/assets\/images\/movies\/Star_Wars_Episode_V_The_Empir
e_Strikes_Back_1980\/smallcover.jpg","medium_cover_image":"https:\/\/yts.lt\/assets\/images\/movies\/Star_Wars_Episode_V_The_Empire_Str
ikes_Back_1980\/mediumcover.jpg","large_cover_image":"https:\/\/yts.lt\/assets\/images\/movies\/Star_Wars_Episode_V_The_Empire_Stri
kes_Back_1980\/large-cover.jpg","state":"ok","torrents":
[{"url":"https:\/\/yts.lt\/torrent\/download\/0E5519DBB0678BC824CE863CB2F4DDD37D0C1C9A","hash":"0E5519DBB0678
BC824CE863CB2F4DDD37D0C1C9A","quality":"720p","type":"bluray","seeds":36,"peers":12,"size":"1.08
GB","size_bytes":1159641170,"date_uploaded":"2018-04-26 04:24:10","date_uploaded_unix":1524709450},
{"url":"https:\/\/yts.lt\/torrent\/download\/898880149B304FEAA5FF6F6DE633AA4C5703DC1A","hash":"898880149B304F
EAA5FF6F6DE633AA4C5703DC1A","quality":"1080p","type":"bluray","seeds":353,"peers":52,"size":"1.70
GB","size_bytes":1825361101,"date_uploaded":"2015-11-01
01:41:42","date_uploaded_unix":1446338502}],"date_uploaded":"2018-04-26
04:24:10","date_uploaded_unix":1524709450},{"id":6532,"url":"https:\/\/yts.lt\/movie\/queen-rock-montreallive-aid-2007","imdb_code":"tt1421377","title":"Queen Rock Montreal & Live Aid","title_english":"Queen Rock
Montreal & Live Aid","title_long":"Queen Rock Montreal & Live Aid (2007)","slug":"queen-rock-montreal-liveaid-2007","year":2007,"rating":8.7,"runtime":138,"genres":["Action","Documentary","Music"],"summary":"The
movie contains two concerts of the British rock band Queen. The first concert is their show at Montreal in
November 1981. The second concert is their live performance at Live Aid in 1985.","description_full":"The
movie contains two concerts of the British rock band Queen. The first concert is their show at Montreal in
November 1981. The second concert is their live performance at Live Aid in 1985.","synopsis":"The movie
contains two concerts of the British rock band Queen. The first concert is their show at Montreal in November
1981. The second concert is their live performance at Live Aid in
1985.","yt_trailer_code":"A22oy8dFjqc","language":"English","mpa_rating":"","background_image":"https:\/\/yts
.lt\/assets\/images\/movies\/queen_rock_montreal_live_aid_2007\/background.jpg","background_image_original":"
https:\/\/yts.lt\/assets\/images\/movies\/queen_rock_montreal_live_aid_2007\/background.jpg","small_cover_ima
ge":"https:\/\/yts.lt\/assets\/images\/movies\/queen_rock_montreal_live_aid_2007\/smallcover.jpg","medium_cover_image":"https:\/\/yts.lt\/assets\/images\/movies\/queen_rock_montreal_live_aid_2007\
/mediumcover.jpg","large_cover_image":"https:\/\/yts.lt\/assets\/images\/movies\/queen_rock_montreal_live_aid_2007\/
large-cover.jpg","state":"ok","torrents":
[{"url":"https:\/\/yts.lt\/torrent\/download\/4D0860BE6A70BEA795F14FFE5E60068302FCA625","hash":"4D0860BE6A70B
EA795F14FFE5E60068302FCA625","quality":"720p","type":"bluray","seeds":12,"peers":4,"size":"712.59
MB","size_bytes":747204772,"date_uploaded":"2017-05-30 04:24:38","date_uploaded_unix":1496111078},
{"url":"https:\/\/yts.lt\/torrent\/download\/829150F8EBA980DD000CED1F9004AA793B033D66","hash":"829150F8EBA980
DD000CED1F9004AA793B033D66","quality":"1080p","type":"bluray","seeds":35,"peers":6,"size":"1.46
GB","size_bytes":1567663063,"date_uploaded":"2017-05-30
08:27:22","date_uploaded_unix":1496125642}],"date_uploaded":"2017-05-30
04:24:38","date_uploaded_unix":1496111078}]


Что я уже пробовал:

Dim jsonstring As String = TextBox1.Text

        Dim jsonarray As JArray = JArray.Parse(jsonstring) 

       Dim lst As New List(Of String) 



        For Each t As JToken In jsonarray

            lst.Add(t.ToString)

        Next

1 Ответов

Рейтинг:
1

OriginalGriff

Начните с публикации данных JSON, которые действительно действительны (и достаточно малы, достаточно отступы, чтобы быть читаемыми) - если только они не проходят через такие сайты, как json2csharp - генерация классов c# из json[^] тогда ваши данные неверны, и мы действительно не можем помочь с плохими данными! (Не имеет значения, что вы используете VB и он генерирует C#, JSON не зависит от языка, когда он правильный.)

Затем объясните, в чем заключается ваша проблема при обработке результатов - хотя, на первый взгляд, правильное получение данных, вероятно, исправит 90% ваших проблем...