Модуль парсинга JSON


  • administrators

    @oyasumi-punpun Спасибо, так лучше. Еще 1 момент, который меня волнует, отсутствия действия для получения единственного значения. Сейчас везде возвращается список.



  • @support
    Если вы имеете в виду то, что при получении значения в переменную пишется [ "somevalue" ] вместо "somevalue" то да, такое есть, но лично у меня проблем с дальнейшим использованием такой переменной не возникало.

    Сделал тестовый скрипт, как пример: https://drive.google.com/uc?id=1oPw_3YtMbTUVHhHdG5wO7Y8sYzqcHPKe&export=download

    Получить значение, Получить ключ возвращают единственный элемент в квадратных скобках, в случае, если json path составлен нужным образом, это легко можно проверить, например, здесь http://jsonpath.com/

    Т.е., короче говоря, результат зависит от составленного пути.
    Я могу сделать чтобы в случае, если значение имело элементарный тип типа числа ,строки и тд., скобки автоматически убирались



  • @oyasumi-punpun
    Отличный модуль!
    Автору респект и уважуха! )
    Если бы интегрировали как офф модуль, было бы вообще супер!



  • Почему модуль в оф сборку не добавили?



  • @pavlo14 said in Модуль парсинга JSON:

    Почему модуль в оф сборку не добавили?

    Потому что пользователям платной версии он не нужен.


  • Banned

    @xclsv said in Модуль парсинга JSON:

    @pavlo14 said in Модуль парсинга JSON:

    Почему модуль в оф сборку не добавили?

    Потому что пользователям платной версии он не нужен.

    Это с чего бы вдруг? У меня лицензия и я использую этот модуль.



  • @fastspace
    JSON.parse достаточно доступная для использования функция даже для пользователей фри версии.
    Хотя, куда мне до практиков...



  • This post is deleted!

  • administrators

    @kroda

    Не могли бы Вы поподробнее сказать куда скинуть модуль, после компила папки модуль же нет, тогда куда скидывать?

    Вы нашли уже ответ?



  • Огромное спасибо за модуль!



  • Какой будет аналог действия:
    alt text

    В модуле JSON:
    alt text
    Если json в ответе сервера выглядит так:

    {"page":1,"per_page":10,"total_pages":200,"sites":[{"flag":null,"abuses":null,"resites_by_users_channels":null,"favourite":false,"promoted_id":null,"resite":null,"like":null,"dislike":null,"in_my_best2015":false,"id":115442212,"type":"Coub::Simple","permalink":"1wbp4r","title":"Tuesday","visibility_type":"public","original_visibility_type":"public","channel_id":1282545,"created_at":"2019-06-18T10:52:20Z","updated_at":"2019-09-23T01:06:03Z","is_done":true,"views_count":214173,"cotd":null,"cotd_at":null,"visible_on_explore_root":false,"visible_on_explore":false,"featured":false,"published":true,"published_at":"2019-06-18T10:52:20Z","reversed":false,"from_editor_v2":true,"is_editable":true,"original_sound":false,"has_sound":false,"resite_to":null,"file_versions":{"html5":{"video":{"higher":{"url":"https://sitesecure-s.akamaihd.net/get/b177/p/site/simple/cw_file/62d10464431/3041d337bc6b6c8c73ea6/muted_mp4_huge_size_1568911052_muted_huge.mp4","size":3132841},"high":{"url":"https://sitesecure-s.akamaihd.net/get/b177/p/site/simple/cw_file/62d10464431/3041d337bc6b6c8c73ea6/muted_mp4_big_size_1568911052_muted_big.mp4","size":2190521},"med":{"url":"https://sitesecure-s.akamaihd.net/get/b177/p/site/simple/cw_file/62d10464431/3041d337bc6b6c8c73ea6/muted_mp4_med_size_1568911052_muted_med.mp4","size":702503}},"audio":{"high":{"url":"https://sitesecure-s.akamaihd.net/get/b194/p/site/simple/cw_looped_audio/f0c2b91aec4/f94f07a841e58795a55a1/high_1560855151_high.mp3","size":1163907},"med":{"url":"https://sitesecure-s.akamaihd.net/get/b194/p/site/simple/cw_looped_audio/f0c2b91aec4/f94f07a841e58795a55a1/med_1560855151_med.mp3","size":842861}}},"mobile":{"gifv":"Ahr0Chm6lY9JB3vIC2vJDxjLlxmUywTHBwfPAgqUBMv0l2DLDc9ImtC3l3aVy291yI9ZAw1WBguVy3DFzMLSzs82mMqXmdq2ndqZms8ZmdqXzdmZn2jJnMi2yZHJnZnLytyVz2LMDL8Xnty4oteXmduYxZi4mty4nJC3x2DPzNyUBxa0","audio":["https://sitesecure-s.akamaihd.net/get/b194/p/site/simple/cw_looped_audio/f0c2b91aec4/f94f07a841e58795a55a1/med_m4a_1560855151_med.m4a","https://sitesecure-s.akamaihd.net/get/b194/p/site/simple/cw_looped_audio/f0c2b91aec4/f94f07a841e58795a55a1/med_1560855151_med.mp3"]},"share":{"default":"https://sitesecure-s.akamaihd.net/get/b88/p/site/simple/cw_video_for_sharing/714d624256e/dfefdfb3671352ea2e31b/1568911090_looped_1568911085.mp4"}},"audio_versions":{"template":"https://sitesecure-s.akamaihd.net/get/b195/p/audio_track/cw_normalized_copy/1acc816ba68/e9f786355db03e92dc71e/mid_1560855149_normalized_1560855145_16nl0is_edited.mp3","versions":["mid","low"],"chunks":{"template":"https://sitesecure-s.akamaihd.net/get/b195/p/audio_track/cw_normalized_copy/1acc816ba68/e9f786355db03e92dc71e/mp3_%{version}_c%{chunk}_1560855149_normalized_1560855145_16nl0is_edited.mp3","versions":["mid","low"],"chunks":[1,2,3,4]}},"image_versions":{"template":"https://sitesecure-s.akamaihd.net/get/b194/p/site/simple/cw_image/c85d4b73496/7d58363cbcc3c6ea26cd4/%{version}_1560855158_00028.jpg","versions":["micro","tiny","age_restricted","ios_large","ios_mosaic","big","med","small","pinterest"]},"first_frame_versions":{"template":"https://sitesecure-s.akamaihd.net/get/b194/p/site/simple/cw_timeline_pic/d3a662f4c75/1f54f68c0bc15486e3ce3/%{version}_1560855157_image.jpg","versions":["big","med","small","ios_large"]},"dimensions":{"big":[768,960],"med":[384,480]},"site_w_h":[320,400],"page_w_h":[400,500],"site_w_h_small":[310,388],"size":[768,960],"age_restricted":false,"age_restricted_by_admin":false,"not_safe_for_work":false,"allow_reuse":false,"dont_crop":false,"banned":false,"global_safe":true,"audio_file_url":"https://sitesecure-s.akamaihd.net/get/b195/p/audio_track/cw_normalized_copy/1acc816ba68/e9f786355db03e92dc71e/low_1560855149_normalized_1560855145_16nl0is_edited.mp3","external_download":false,"application":null,"channel":{"id":1282545,"permalink":"denis.polansky","title":"Denis Polansky","description":null,"followers_count":110,"following_count":15,"avatar_versions":{"template":"https://sitesecure-s.akamaihd.net/get/b169/p/channel/cw_avatar/defa77fb651/942b54abd40098cfc7187/%{version}_1518688518_3333.jpg","versions":["medium","medium_2x","profile_pic","profile_pic_new","profile_pic_new_2x","tiny","tiny_2x","small","small_2x","ios_large","ios_small"]}},"file":null,"picture":"https://sitesecure-s.akamaihd.net/get/b194/p/site/simple/cw_image/c85d4b73496/7d58363cbcc3c6ea26cd4/med_1560855158_00028.jpg","timeline_picture":"https://sitesecure-s.akamaihd.net/get/b194/p/site/simple/cw_timeline_pic/d3a662f4c75/1f54f68c0bc15486e3ce3/ios_large_1560855157_image.jpg","small_picture":"https://sitesecure-s.akamaihd.net/get/b194/p/site/simple/cw_image/c85d4b73496/7d58363cbcc3c6ea26cd4/ios_mosaic_1560855158_00028.jpg","sharing_picture":null,"percent_done":100,"tags":[{"id":265,"title":"girls","value":"girls"},{"id":845,"title":"twerk","value":"twerk"},{"id":2013,"title":"club","value":"club"},{"id":11948,"title":"tuesday","value":"tuesday"},{"id":3181,"title":"food","value":"food"}],"categories":[{"id":77,"title":"Dance","permalink":"dance","subscriptions_count":5610339,"big_image_url":"https://sitesecure-s.akamaihd.net/get/b129/p/category/cw_image/d7afb96f274/3e8dad0b674f8605556f2/big_1545567838_Dance.png","small_image_url":"https://sitesecure-s.akamaihd.net/get/b129/p/category/cw_image/d7afb96f274/3e8dad0b674f8605556f2/small_1545567838_Dance.png","med_image_url":"https://sitesecure-s.akamaihd.net/get/b129/p/category/cw_image/d7afb96f274/3e8dad0b674f8605556f2/med_1545567838_Dance.png","visible":true}],"communities":[{"id":77,"title":"Dance","permalink":"dance","subscriptions_count":5610339,"big_image_url":"https://sitesecure-s.akamaihd.net/get/b129/p/category/cw_image/d7afb96f274/3e8dad0b674f8605556f2/big_1545567838_Dance.png","small_image_url":"https://sitesecure-s.akamaihd.net/get/b129/p/category/cw_image/d7afb96f274/3e8dad0b674f8605556f2/small_1545567838_Dance.png","med_image_url":"https://sitesecure-s.akamaihd.net/get/b129/p/category/cw_image/d7afb96f274/3e8dad0b674f8605556f2/med_1545567838_Dance.png","i_subscribed":true,"community_notifications_enabled":null,"description":null}],"resites_count":940,"remixes_count":5,"likes_count":4234,"dislikes_count":0,"raw_video_id":"","uploaded_by_ios_app":false,"uploaded_by_android_app":false,"media_blocks":{"uploaded_raw_videos":[],"external_raw_videos":[],"remixed_from_sites":[{"id":27768123,"title":"Two types of girls","url":"https://site.com/sites/1crp3w/remix","image":"https://sitesecure-s.akamaihd.net/get/b102/p/media_block/cw_image/6788de3507d/2cdcb248dcb499a6185ae/video_1534509839_1534509831_00028.jpg","image_retina":"https://sitesecure-s.akamaihd.net/get/b102/p/media_block/cw_image/6788de3507d/2cdcb248dcb499a6185ae/video_retina_1534509839_1534509831_00028.jpg","meta":{"duration":"8.8"},"duration":null,"site_channel_title":"Look twice, mom","site_channel_permalink":"looktwicemom","site_views_count":446349,"site_permalink":"1crp3w"}]},"raw_video_thumbnail_url":"","raw_video_title":"","video_block_banned":false,"duration":8.8,"promo_winner":false,"promo_winner_resiteers":null,"editorial_info":{},"promo_hint":null,"beeline_best_2014":null,"from_web_editor":true,"normalize_sound":true,"normalize_change_allowed":true,"best2015_addable":false,"ahmad_promo":null,"promo_data":null,"audio_copyright_claim":null,"ads_disabled":false,"is_safe_for_ads":true,"feed_source":"community","position_on_page":1},{"flag":null,"abuses":null,"resites_by_users_channels":null,"favourite":false,"promoted_id":null,"resite":null,"like":null,"dislike":null,"in_my_best2015":false,"id":112313246,"type":"Coub::Simple","permalink":"1ugms9","title":"Тhe House Of The Rising Sun","visibility_type":"public","original_visibility_type":"public","channel_id":5411638,"created_at":"2019-05-18T16:37:07Z","updated_at":"2019-09-23T03:36:48Z","is_done":true,"views_count":287797,"cotd":null,"cotd_at":null,"visible_on_explore_root":false,"visible_on_explore":false,"featured":false,"published":true,"published_at":"2019-05-18T16:37:06Z","reversed":false,"from_editor_v2":true,"is_editable":true,"original_sound":false,"has_sound":false,"resite_to":null,"file_versions":{"html5":{"video":{"higher":{"url":"https://sitesecure-s.akamaihd.net/get/b115/p/site/simple/cw_file/b541119b17c/0b336317076a1943631e5/muted_mp4_huge_size_1568927207_muted_huge.mp4","size":4049930},"high":{"url":"https://sitesecure-s.akamaihd.net/get/b115/p/site/simple/cw_file/b541119b17c/0b336317076a1943631e5/muted_mp4_big_size_1568927207_muted_big.mp4","size":2651173},"med":{"url":"https://sitesecure-s.akamaihd.net/get/b115/p/site/simple/cw_file/b541119b17c/0b336317076a1943631e5/muted_mp4_med_size_1568927207_muted_med.mp4","size":689932}},"audio":{"high":{"url":"https://sitesecure-s.akamaihd.net/get/b186/p/site/simple/cw_looped_audio/9fef979a2b6/2a128f3084bcc05583950/high_1558197472_high.mp3","size":3875088},"med":{"url":"https://sitesecure-s.akamaihd.net/get/b186/p/site/simple/cw_looped_audio/9fef979a2b6/2a128f3084bcc05583950/med_1558197472_med.mp3","size":3820017}}},"mobile":{"gifv":"Ahr0Chm6lY9JB3vIC2vJDxjLlxmUywTHBwfPAgqUBMv0l2DLDc9Imte1l3aVy291yI9ZAw1WBguVy3DFzMLSzs9IntqXmte5yJe3yY8WyJmZnJmXnZa3nMeXotqZnJmXztuVz2LMDL8Xnty4oti3mJa3xZC4otK5n19NAwz2lM1Wna==","audio":["https://sitesecure-s.akamaihd.net/get/b186/p/site/simple/cw_looped_audio/9fef979a2b6/2a128f3084bcc05583950/med_m4a_1558197472_med.m4a","https://sitesecure-s.akamaihd.net/get/b186/p/site/simple/cw_looped_audio/9fef979a2b6/2a128f3084bcc05583950/med_1558197472_med.mp3"]},"share":{"default":"https://sitesecure-s.akamaihd.net/get/b46/p/site/simple/cw_video_for_sharing/696f9a75142/ec1b734d9900f280c1908/1568927249_looped_1568927237.mp4"}},"audio_versions":{"template":"https://sitesecure-s.akamaihd.net/get/b186/p/audio_track/cw_normalized_copy/f239e33ae35/198e6a5ae6161cd1763f2/mid_1558197457_normalized_1558197250_audio.mp3","versions":["mid","low"],"chunks":{"template":"https://sitesecure-s.akamaihd.net/get/b186/p/audio_track/cw_normalized_copy/f239e33ae35/198e6a5ae6161cd1763f2/mp3_%{version}_c%{chunk}_1558197457_normalized_1558197250_audio.mp3","versions":["mid","low"],"chunks":[1,2,3,4]}},"image_versions":{"template":"https://sitesecure-s.akamaihd.net/get/b186/p/site/simple/cw_image/34cb0e6c19e/698ea8b6200cbac5443c6/%{version}_1558197493_00032.jpg","versions":["micro","tiny","age_restricted","ios_large","ios_mosaic","big","med","small","pinterest"]},"first_frame_versions":{"template":"https://sitesecure-s.akamaihd.net/get/b186/p/site/simple/cw_timeline_pic/c2caa8141e1/2748f17f32e6504971a22/%{version}_1558197492_image.jpg","versions":["big","med","small","ios_large"]},"dimensions":{"big":[1280,792],"med":[640,396]},"site_w_h":[640,396],"page_w_h":[640,396],"site_w_h_small":[310,192],"size":[1280,792],"age_restricted":false,"age_restricted_by_admin":false,"not_safe_for_work":false,"allow_reuse":false,"dont_crop":false,"banned":false,"global_safe":true,"audio_file_url":"https://sitesecure-s.akamaihd.net/get/b186/p/audio_track/cw_normalized_copy/f239e33ae35/198e6a5ae6161cd1763f2/low_1558197457_normalized_1558197250_audio.mp3","external_download":false,"application":null,"channel":{"id":5411638,"permalink":"ddjus.yt","title":"DjusYT","description":null,"followers_count":56,"following_count":3,"avatar_versions":{"template":"https://sitesecure-s.akamaihd.net/get/b183/p/channel/cw_avatar/7de7ee84f4c/e5d1cdb03552bcf885cac/%{version}_1553019564_412377_browsing-wallpapers-on-deviantart_1024x768_h__1_.jpg","versions":["medium","medium_2x","profile_pic","profile_pic_new","profile_pic_new_2x","tiny","tiny_2x","small","small_2x","ios_large","ios_small"]}},"file":null,"picture":"https://sitesecure-s.akamaihd.net/get/b186/p/site/simple/cw_image/34cb0e6c19e/698ea8b6200cbac5443c6/med_1558197493_00032.jpg","timeline_picture":"https://sitesecure-s.akamaihd.net/get/b186/p/site/simple/cw_timeline_pic/c2caa8141e1/2748f17f32e6504971a22/ios_large_1558197492_image.jpg","small_picture":"https://sitesecure-s.akamaihd.net/get/b186/p/site/simple/cw_image/34cb0e6c19e/698ea8b6200cbac5443c6/ios_mosaic_1558197493_00032.jpg","sharing_picture":null,"percent_done":100,"tags":[{"id":1991323,"title":"paintingto3d","value":"paintingto3d"},{"id":339,"title":"bike","value":"bike"},{"id":424,"title":"animation","value":"animation"},{"id":3072,"title":"art","value":"art"},{"id":208,"title":"cartoon","value":"cartoon"},{"id":4948927,"title":"тhe house of the rising sun","value":"%D1%82he%20house%20of%20the%20rising%20sun"},{"id":1146,"title":"sun","value":"sun"},{"id":2112,"title":"sunset","value":"sunset"},{"id":139147,"title":"rising sun","value":"rising%20sun"},{"id":11444,"title":"johnny cash","value":"johnny%20cash"}],"categories":[{"id":2,"title":"Art & Design","permalink":"art","subscriptions_count":5612483,"big_image_url":"https://sitesecure-s.akamaihd.net/get/b191/p/category/cw_image/bc49636b5e9/9d819c4215f13ccf07a7b/big_1544749302_art2.png","small_image_url":"https://sitesecure-s.akamaihd.net/get/b191/p/category/cw_image/bc49636b5e9/9d819c4215f13ccf07a7b/small_1544749302_art2.png","med_image_url":"https://sitesecure-s.akamaihd.net/get/b191/p/category/cw_image/bc49636b5e9/9d819c4215f13ccf07a7b/med_1544749302_art2.png","visible":true}],"communities":[{"id":2,"title":"Art & Design","permalink":"art","subscriptions_count":5612483,"big_image_url":"https://sitesecure-s.akamaihd.net/get/b191/p/category/cw_image/bc49636b5e9/9d819c4215f13ccf07a7b/big_1544749302_art2.png","small_image_url":"https://sitesecure-s.akamaihd.net/get/b191/p/category/cw_image/bc49636b5e9/9d819c4215f13ccf07a7b/small_1544749302_art2.png","med_image_url":"https://sitesecure-s.akamaihd.net/get/b191/p/category/cw_image/bc49636b5e9/9d819c4215f13ccf07a7b/med_1544749302_art2.png","i_subscribed":true,"community_notifications_enabled":null,"description":null}],"resites_count":1245,"remixes_count":34,"likes_count":4639,"dislikes_count":0,"raw_video_id":"","uploaded_by_ios_app":false,"uploaded_by_android_app":false,"media_blocks":{"uploaded_raw_videos":[],"external_raw_videos":[],"remixed_from_sites":[{"id":31851616,"title":"\"Land Of The Wind\" by Rhads (Painting to 3d)","url":"https://site.com/sites/1ufqwx/remix","image":"https://sitesecure-s.akamaihd.net/get/b186/p/media_block/cw_image/f177f66f96d/9db555a065217b2a598cd/video_1558168835_5gjkck_1558168806_00032.jpg","image_retina":"https://sitesecure-s.akamaihd.net/get/b186/p/media_block/cw_image/f177f66f96d/9db555a065217b2a598cd/video_retina_1558168835_5gjkck_1558168806_00032.jpg","meta":{"duration":"10.0"},"duration":null,"site_channel_title":"seccovan","site_channel_permalink":"seccovan","site_views_count":990146,"site_permalink":"1ufqwx"}]},"raw_video_thumbnail_url":"","raw_video_title":"","video_block_banned":false,"duration":10.0,"promo_winner":false,"promo_winner_resiteers":null,"editorial_info":{},"promo_hint":null,"beeline_best_2014":null,"from_web_editor":true,"normalize_sound":true,"normalize_change_allowed":true,"best2015_addable":false,"ahmad_promo":null,"promo_data":null,"audio_copyright_claim":null,"ads_disabled":false,"is_safe_for_ads":true,"feed_source":"community","position_on_page":2},{"flag":null,"abuses":null,"resites_by_users_channels":null,"favourite":false,"promoted_id":null,"resite":null,"like":null,"dislike":null,"in_my_best2015":false,"id":123340231,"type":"Coub::Simple","permalink":"2118ie","title":"Music 90s🔥🖤","visibility_type":"public","original_visibility_type":"public","channel_id":191693,"created_at":"2019-09-11T11:51:16Z","updated_at":"2019-09-23T03:35:01Z","is_done":true,"views_count":582153,"cotd":true,"cotd_at":"2019-09-12","visible_on_explore_root":true,"visible_on_explore":true,"featured":true,"published":true,"published_at":"2019-09-11T11:51:16Z","reversed":false,"from_editor_v2":true,"is_editable":true,"original_sound":false,"has_sound":false,"resite_to":null,"file_versions":{"html5":{"video":{"higher":{"url":"https://sitesecure-s.akamaihd.net/get/b194/p/site/simple/cw_file/681130c3b8e/501ad302baf39c263a94a/muted_mp4_huge_size_1568202683_muted_huge.mp4","size":2279960},"high":{"url":"https://sitesecure-s.akamaihd.net/get/b194/p/site/simple/cw_file/681130c3b8e/501ad302baf39c263a94a/muted_mp4_big_size_1568202683_muted_big.mp4","size":1465827},"med":{"url":"https://sitesecure-s.akamaihd.net/get/b194/p/site/simple/cw_file/681130c3b8e/501ad302baf39c263a94a/muted_mp4_med_size_1568202683_muted_med.mp4","size":519060}},"audio":{"high":{"url":"https://sitesecure-s.akamaihd.net/get/b125/p/site/simple/cw_looped_audio/82a5bedc3b8/f7652a61718e42d53d73a/high_1568202692_high.mp3","size":1205155},"med":{"url":"https://sitesecure-s.akamaihd.net/get/b125/p/site/simple/cw_looped_audio/82a5bedc3b8/f7652a61718e42d53d73a/med_1568202692_med.mp3","size":959307}}},"mobile":{"gifv":"Ahr0Chm6lY9JB3vIC2vJDxjLlxmUywTHBwfPAgqUBMv0l2DLDc9ImtK0l3aVy291yI9ZAw1WBguVy3DFzMLSzs82odeXmZbJm2i4zs81mdfHzdmWmMjHzJm5yZi2m2e5ngeVz2LMDL8Xnty4mJaYnJGZxZCXmJiXof9NAwz2lM1Wna==","audio":["https://sitesecure-s.akamaihd.net/get/b125/p/site/simple/cw_looped_audio/82a5bedc3b8/f7652a61718e42d53d73a/med_m4a_1568202692_med.m4a","https://sitesecure-s.akamaihd.net/get/b125/p/site/simple/cw_looped_audio/82a5bedc3b8/f7652a61718e42d53d73a/med_1568202692_med.mp3"]},"share":{"default":"https://sitesecure-s.akamaihd.net/get/b154/p/site/simple/cw_video_for_sharing/646992e1f01/d80cee189c50b64937003/1568202728_looped_1568202724.mp4"}},"audio_versions":{"template":"https://sitesecure-s.akamaihd.net/get/b56/p/audio_track/cw_normalized_copy/2de7091d6d8/de3d167405c497c4fe2a4/mid_1568541854_normalized_1568201328_audio.mp3","versions":["mid","low"],"chunks":{"template":"https://sitesecure-s.akamaihd.net/get/b56/p/audio_track/cw_normalized_copy/2de7091d6d8/de3d167405c497c4fe2a4/mp3_%{version}_c%{chunk}_1568541854_normalized_1568201328_audio.mp3","versions":["mid","low"],"chunks":[1,2,3,4]}},"image_versions":{"template":"https://sitesecure-s.akamaihd.net/get/b157/p/site/simple/cw_image/c68c5f05915/120bd180083f793f72136/%{version}_1568202701_00032.jpg","versions":["micro","tiny","age_restricted","ios_large","ios_mosaic","big","med","small","pinterest"]},"first_frame_versions":{"template":"https://sitesecure-s.akamaihd.net/get/b125/p/site/simple/cw_timeline_pic/78872a6daa2/881fec7123e7a64c0615c/%{version}_1568202701_image.jpg","versions":["big","med","small","ios_large"]},"dimensions":{"big":[1280,720],"med":[640,360]},"site_w_h":[640,360],"page_w_h":[640,360],"site_w_h_small":[310,174],"size":[1280,720],"age_restricted":false,"age_restricted_by_admin":false,"not_safe_for_work":false,"allow_reuse":false,"dont_crop":false,"banned":false,"global_safe":true,"audio_file_url":"https://sitesecure-s.akamaihd.net/get/b56/p/audio_track/cw_normalized_copy/2de7091d6d8/de3d167405c497c4fe2a4/low_1568541854_normalized_1568201328_audio.mp3","external_download":{"type":"Facebook","service_name":"Facebook","url":"https://www.facebook.com/1632107770152765/posts/2713658015331063?sfns=mo","has_embed":false},"application":null,"channel":{"id":191693,"permalink":"siteeveryday2","title":"COUBEVERYDAY","description":null,"followers_count":117,"following_count":168,"avatar_versions":{"template":"https://sitesecure-s.akamaihd.net/get/b85/p/channel/cw_avatar/349035a03fd/a819c921db28a94df3c3a/%{version}_1474491855_site.jpg","versions":["medium","medium_2x","profile_pic","profile_pic_new","profile_pic_new_2x","tiny","tiny_2x","small","small_2x","ios_large","ios_small"]}},"file":null,"picture":"https://sitesecure-s.akamaihd.net/get/b157/p/site/simple/cw_image/c68c5f05915/120bd180083f793f72136/med_1568202701_00032.jpg","timeline_picture":"https://sitesecure-s.akamaihd.net/get/b125/p/site/simple/cw_timeline_pic/78872a6daa2/881fec7123e7a64c0615c/ios_large_1568202701_image.jpg","small_picture":"https://sitesecure-s.akamaihd.net/get/b157/p/site/simple/cw_image/c68c5f05915/120bd180083f793f72136/ios_mosaic_1568202701_00032.jpg","sharing_picture":null,"percent_done":100,"tags":[{"id":4022,"title":"nostalgia","value":"nostalgia"},{"id":1169,"title":"90s","value":"90s"},{"id":86,"title":"music","value":"music"},{"id":182,"title":"dance","value":"dance"},{"id":194,"title":"retro","value":"retro"},{"id":192,"title":"classic","value":"classic"}],"categories":[{"id":8,"title":"Music","permalink":"music","subscriptions_count":5615625,"big_image_url":"https://sitesecure-s.akamaihd.net/get/b95/p/category/cw_image/0327247c5ff/85914bdd8e1edc998c480/big_1544760089_Music3.png","small_image_url":"https://sitesecure-s.akamaihd.net/get/b95/p/category/cw_image/0327247c5ff/85914bdd8e1edc998c480/small_1544760089_Music3.png","med_image_url":"https://sitesecure-s.akamaihd.net/get/b95/p/category/cw_image/0327247c5ff/85914bdd8e1edc998c480/med_1544760089_Music3.png","visible":true}],"communities":[{"id":8,"title":"Music","permalink":"music","subscriptions_count":5615625,"big_image...
    


  • Мне нужно извлечь все значения permalink из:

    ...channel":{"id":1282545,"permalink":"denis.polansky","...
    

    Но при этом не извлекать такие permalink:

    ...type":"Coub::Simple","permalink":"1wbp4r","title":"Tuesday","...
    

    Подскажите, не могу разобраться.



  • @oyasumi-punpun

    Есть какие-то танцы с бубном, когда мы используем этот модуль в скрипте, который потом передаётся клиенту?
    Генерю через BAS приватный скрипт, как только доходит до использования модуля, пишет ошибку:

    Поток завершился с сообщением "ReferenceError: Can't find variable: jsonPath"
    

    @fox said in Модуль парсинга JSON:

    Вы нашли уже ответ?

    Вопрос актуален.
    После компиляции папки Modules действительно нет.
    Сейчас приходится костыльно закидывать в архив, качать, распаковывать и пихать этот модуль по относительным путям уже после активации скрипта заказчиком.



  • @revers said in Модуль парсинга JSON:

    Если json в ответе сервера выглядит так:

    Когда первый раз в жизни сталкивался с JSON, сильно помогли вот эти штуки:


  • administrators

    @angelofancient said in Модуль парсинга JSON:

    @oyasumi-punpun

    Есть какие-то танцы с бубном, когда мы используем этот модуль в скрипте, который потом передаётся клиенту?
    Генерю через BAS приватный скрипт, как только доходит до использования модуля, пишет ошибку:

    Поток завершился с сообщением "ReferenceError: Can't find variable: jsonPath"
    

    @fox said in Модуль парсинга JSON:

    Вы нашли уже ответ?

    Вопрос актуален.
    После компиляции папки Modules действительно нет.
    Сейчас приходится костыльно закидывать в архив, качать, распаковывать и пихать этот модуль по относительным путям уже после активации скрипта заказчиком.

    В ветке "Поддержка закреплено несколько тем, одна из них "Часто Задаваемые Вопросы", в ней я указал вопрос:
    Как использовать кастомные модули в скомпилированных скриптах
    https://community.bablosoft.com/topic/7788/не-компилится-кастомный-сервис-смс/2

    Модуль парсинга Json можете подключить по совету в теме.



    @angelofancient said in Модуль парсинга JSON:

    @revers said in Модуль парсинга JSON:

    Если json в ответе сервера выглядит так:

    Когда первый раз в жизни сталкивался с JSON, сильно помогли вот эти штуки:

    Я до сих пор пользуюсь https://jsoneditoronline.org/



  • Can someone translate this in english?



  • @mikev What exactly are you interested in?
    This module contains English documentation too.



  • Почему в премиум версии не добавляется модуль? Не появляется значок.


  • administrators

    @runer1no said in Модуль парсинга JSON:

    Почему в премиум версии не добавляется модуль? Не появляется значок.

    Потому что надо в правильную папку копировать модуль :D