Related
Hi I am new on Python and pandas. So please excuse my mistakes.
I want to know if it's possible to use a dataframe and sort it with pandas.
I'm still in class, but I'd like to advance in my projects.
I want / I'd like to extract part of the JSON file.
I want all the system_name =Métro de Paris to be in a JSON file.
Following are the current code I have (JSON and script).
Thanks in advance for your help!
import pandas as pd
# parse according to "system_name":"Métro de Paris"
data = pd.read_json(r'paris_lines_systems_and_modes.json')
[{"id":406,"name":"Ancien M 2nord","url_name":"406-ancien-m-2nord","color":"#000","system_id":83,"system_name":"Métro de Paris","transport_mode_id":4,"transport_mode_name":"heavy_rail"},{"id":405,"name":"Ancien M 2sud","url_name":"405-ancien-m-2sud","color":"#000","system_id":83,"system_name":"Métro de Paris","transport_mode_id":4,"transport_mode_name":"heavy_rail"},{"id":399,"name":"Ancien M 14","url_name":"399-ancien-m-14","color":"#000","system_id":83,"system_name":"Métro de Paris","transport_mode_id":4,"transport_mode_name":"heavy_rail"},{"id":460,"name":"Ancienne ligne A Nord-Sud","url_name":"460-ancienne-ligne-a-nord-sud","color":"#000","system_id":83,"system_name":"Métro de Paris","transport_mode_id":4,"transport_mode_name":"heavy_rail"},{"id":459,"name":"Ancienne ligne B Nord-Sud","url_name":"459-ancienne-ligne-b-nord-sud","color":"#000","system_id":83,"system_name":"Métro de Paris","transport_mode_id":4,"transport_mode_name":"heavy_rail"},{"id":411,"name":"Austerlitz-Auteuil","url_name":"411-austerlitz-auteuil","color":"#000","system_id":303,"system_name":"Navettes fluviales","transport_mode_id":0,"transport_mode_name":"default"},{"id":471,"name":"CDG Express","url_name":"471-cdgexpress","color":"#f0871f","system_id":299,"system_name":"Dessertes aéroportuaires","transport_mode_id":7,"transport_mode_name":"people_mover"},{"id":465,"name":"CDGVal 1","url_name":"465-cdgval-1","color":"#0a3071","system_id":299,"system_name":"Dessertes aéroportuaires","transport_mode_id":7,"transport_mode_name":"people_mover"},{"id":466,"name":"CDGVal 2","url_name":"466-cdgval-2","color":"#0a3071","system_id":299,"system_name":"Dessertes aéroportuaires","transport_mode_id":7,"transport_mode_name":"people_mover"},{"id":410,"name":"Charenton-Auteuil","url_name":"410-charenton-auteuil","color":"#000","system_id":303,"system_name":"Navettes fluviales","transport_mode_id":0,"transport_mode_name":"default"},{"id":407,"name":"Funiculaire de Monmartre","url_name":"407-funiculaire","color":"#601e92","system_id":302,"system_name":"Funiculaire","transport_mode_id":0,"transport_mode_name":"default"},{"id":381,"name":"H","url_name":"381-h","color":"#7b4339","system_id":298,"system_name":"Transilien","transport_mode_id":2,"transport_mode_name":"inter_city_rail"},{"id":382,"name":"J","url_name":"382-j","color":"#cdcd00","system_id":298,"system_name":"Transilien","transport_mode_id":2,"transport_mode_name":"inter_city_rail"},{"id":383,"name":"K","url_name":"383-k","color":"#c7b300","system_id":298,"system_name":"Transilien","transport_mode_id":2,"transport_mode_name":"inter_city_rail"},{"id":384,"name":"L","url_name":"384-l","color":"#7584bc","system_id":298,"system_name":"Transilien","transport_mode_id":2,"transport_mode_name":"inter_city_rail"},{"id":472,"name":"Le Bus Direct 1","url_name":"472-le-bus-direct-1","color":"#b20066","system_id":299,"system_name":"Dessertes aéroportuaires","transport_mode_id":8,"transport_mode_name":"bus"},{"id":473,"name":"Le Bus Direct 2","url_name":"473-le-bus-direct-2","color":"#7bbb58","system_id":299,"system_name":"Dessertes aéroportuaires","transport_mode_id":8,"transport_mode_name":"bus"},{"id":474,"name":"Le Bus Direct 3","url_name":"474-le-bus-direct-3","color":"#0098d8","system_id":299,"system_name":"Dessertes aéroportuaires","transport_mode_id":8,"transport_mode_name":"bus"},{"id":475,"name":"Le Bus Direct 4","url_name":"475-le-bus-direct-4","color":"#ff9b00","system_id":299,"system_name":"Dessertes aéroportuaires","transport_mode_id":8,"transport_mode_name":"bus"},{"id":412,"name":" Le Louvre-Ablon","url_name":"412-le-louvre-ablon","color":"#000","system_id":303,"system_name":"Navettes fluviales","transport_mode_id":0,"transport_mode_name":"default"},{"id":643,"name":"Ligne Horizon","url_name":"643-ligne-horizon","color":"#0092e2","system_id":83,"system_name":"Métro de Paris","transport_mode_id":4,"transport_mode_name":"heavy_rail"},{"id":352,"name":"M 1","url_name":"352-ligne-1","color":"#ffcd00","system_id":83,"system_name":"Métro de Paris","transport_mode_id":4,"transport_mode_name":"heavy_rail"},{"id":353,"name":"M 2","url_name":"353-ligne-2","color":"#006db8","system_id":83,"system_name":"Métro de Paris","transport_mode_id":4,"transport_mode_name":"heavy_rail"},{"id":354,"name":"M 3","url_name":"354-ligne-3","color":"#9b993b","system_id":83,"system_name":"Métro de Paris","transport_mode_id":4,"transport_mode_name":"heavy_rail"},{"id":355,"name":"M 3bis","url_name":"355-ligne-3bis","color":"#88d3df","system_id":83,"system_name":"Métro de Paris","transport_mode_id":4,"transport_mode_name":"heavy_rail"},{"id":356,"name":"M 4","url_name":"356-ligne-4","color":"#ba4a9a","system_id":83,"system_name":"Métro de Paris","transport_mode_id":4,"transport_mode_name":"heavy_rail"},{"id":357,"name":"M 5","url_name":"357-ligne-5","color":"#f78e4b","system_id":83,"system_name":"Métro de Paris","transport_mode_id":4,"transport_mode_name":"heavy_rail"},{"id":358,"name":"M 6","url_name":"358-ligne-6","color":"#77c596","system_id":83,"system_name":"Métro de Paris","transport_mode_id":4,"transport_mode_name":"heavy_rail"},{"id":303,"name":"M 7","url_name":"303-ligne-7","color":"#f49eb2","system_id":83,"system_name":"Métro de Paris","transport_mode_id":4,"transport_mode_name":"heavy_rail"},{"id":359,"name":"M 7bis","url_name":"359-ligne-7bis","color":"#77c596","system_id":83,"system_name":"Métro de Paris","transport_mode_id":4,"transport_mode_name":"heavy_rail"},{"id":360,"name":"M 8","url_name":"360-ligne-8","color":"#c5a3cc","system_id":83,"system_name":"Métro de Paris","transport_mode_id":4,"transport_mode_name":"heavy_rail"},{"id":361,"name":"M 9","url_name":"361-ligne-9","color":"#cdc92b","system_id":83,"system_name":"Métro de Paris","transport_mode_id":4,"transport_mode_name":"heavy_rail"},{"id":362,"name":"M 10","url_name":"362-ligne-10","color":"#dfb03a","system_id":83,"system_name":"Métro de Paris","transport_mode_id":4,"transport_mode_name":"heavy_rail"},{"id":363,"name":"M 11","url_name":"363-ligne-11","color":"#8c6539","system_id":83,"system_name":"Métro de Paris","transport_mode_id":4,"transport_mode_name":"heavy_rail"},{"id":364,"name":"M 12","url_name":"364-ligne-12","color":"#008c59","system_id":83,"system_name":"Métro de Paris","transport_mode_id":4,"transport_mode_name":"heavy_rail"},{"id":365,"name":"M 13","url_name":"365-ligne-13","color":"#87d2df","system_id":83,"system_name":"Métro de Paris","transport_mode_id":4,"transport_mode_name":"heavy_rail"},{"id":366,"name":"M 14","url_name":"366-ligne-14","color":"#662c91","system_id":83,"system_name":"Métro de Paris","transport_mode_id":4,"transport_mode_name":"heavy_rail"},{"id":395,"name":"M 15","url_name":"395-m-15","color":"#a60f31","system_id":300,"system_name":"Grand Paris Express","transport_mode_id":4,"transport_mode_name":"heavy_rail"},{"id":396,"name":"M 16","url_name":"396-m-16","color":"#ec7cae","system_id":300,"system_name":"Grand Paris Express","transport_mode_id":4,"transport_mode_name":"heavy_rail"},{"id":397,"name":"M 17","url_name":"397-m-17","color":"#ec7cae","system_id":300,"system_name":"Grand Paris Express","transport_mode_id":4,"transport_mode_name":"heavy_rail"},{"id":398,"name":"M 18","url_name":"398-m-18","color":"#95bf32","system_id":300,"system_name":"Grand Paris Express","transport_mode_id":4,"transport_mode_name":"heavy_rail"},{"id":385,"name":"N","url_name":"385-n","color":"#00a092","system_id":298,"system_name":"Transilien","transport_mode_id":2,"transport_mode_name":"inter_city_rail"},{"id":476,"name":"Navette","url_name":"476-navette","color":"#000","system_id":83,"system_name":"Métro de Paris","transport_mode_id":4,"transport_mode_name":"heavy_rail"},{"id":394,"name":"Orlyval","url_name":"394-orlyval","color":"#7d7e7e","system_id":299,"system_name":"Dessertes aéroportuaires","transport_mode_id":7,"transport_mode_name":"people_mover"},{"id":386,"name":"P","url_name":"386-p","color":"#f0b600","system_id":298,"system_name":"Transilien","transport_mode_id":2,"transport_mode_name":"inter_city_rail"},{"id":387,"name":"R","url_name":"387-r","color":"#e4b4d1","system_id":298,"system_name":"Transilien","transport_mode_id":2,"transport_mode_name":"inter_city_rail"},{"id":376,"name":"RER A","url_name":"376-rer-a","color":"#ec1b2a","system_id":297,"system_name":"RER","transport_mode_id":3,"transport_mode_name":"commuter_rail"},{"id":377,"name":"RER B","url_name":"377-rer-b","color":"#4c90cc","system_id":297,"system_name":"RER","transport_mode_id":3,"transport_mode_name":"commuter_rail"},{"id":378,"name":"RER C","url_name":"378-rer-c","color":"#ffdc1d","system_id":297,"system_name":"RER","transport_mode_id":3,"transport_mode_name":"commuter_rail"},{"id":379,"name":"RER D","url_name":"379-rer-d","color":"#00ab66","system_id":297,"system_name":"RER","transport_mode_id":3,"transport_mode_name":"commuter_rail"},{"id":380,"name":"RER E","url_name":"380-rer-e","color":"#c67db4","system_id":297,"system_name":"RER","transport_mode_id":3,"transport_mode_name":"commuter_rail"},{"id":414,"name":"STCRP","url_name":"414-stcrp","color":"#000","system_id":303,"system_name":"Navettes fluviales","transport_mode_id":0,"transport_mode_name":"default"},{"id":367,"name":"T 1","url_name":"367-ligne-1","color":"#14609e","system_id":296,"system_name":"Tramway d'Île-de-France","transport_mode_id":5,"transport_mode_name":"light_rail"},{"id":368,"name":"T 2","url_name":"368-ligne-2","color":"#ba498d","system_id":296,"system_name":"Tramway d'Île-de-France","transport_mode_id":5,"transport_mode_name":"light_rail"},{"id":369,"name":"T 3a","url_name":"369-ligne-3a","color":"#ef7d2d","system_id":296,"system_name":"Tramway d'Île-de-France","transport_mode_id":5,"transport_mode_name":"light_rail"},{"id":370,"name":"T 3b","url_name":"370-ligne-3b","color":"#009b41","system_id":296,"system_name":"Tramway d'Île-de-France","transport_mode_id":5,"transport_mode_name":"light_rail"},{"id":371,"name":"T 4","url_name":"371-ligne-4","color":"#d9922b","system_id":296,"system_name":"Tramway d'Île-de-France","transport_mode_id":5,"transport_mode_name":"light_rail"},{"id":372,"name":"T 5","url_name":"372-ligne-5","color":"#914e8e","system_id":296,"system_name":"Tramway d'Île-de-France","transport_mode_id":5,"transport_mode_name":"light_rail"},{"id":373,"name":"T 6","url_name":"373-ligne-7","color":"#e95c36","system_id":296,"system_name":"Tramway d'Île-de-France","transport_mode_id":5,"transport_mode_name":"light_rail"},{"id":375,"name":"T 7","url_name":"375-t-7","color":"#885f30","system_id":296,"system_name":"Tramway d'Île-de-France","transport_mode_id":5,"transport_mode_name":"light_rail"},{"id":374,"name":"T 8","url_name":"374-t-8","color":"#8c8235","system_id":296,"system_name":"Tramway d'Île-de-France","transport_mode_id":5,"transport_mode_name":"light_rail"},{"id":389,"name":"T 9","url_name":"389-t-9","color":"#009cb4","system_id":296,"system_name":"Tramway d'Île-de-France","transport_mode_id":5,"transport_mode_name":"light_rail"},{"id":390,"name":"T 10","url_name":"390-t-10","color":"#8c8235","system_id":296,"system_name":"Tramway d'Île-de-France","transport_mode_id":5,"transport_mode_name":"light_rail"},{"id":391,"name":"T 11","url_name":"391-t-11","color":"#df5f3d","system_id":296,"system_name":"Tramway d'Île-de-France","transport_mode_id":5,"transport_mode_name":"light_rail"},{"id":506,"name":"T 11 express","url_name":"506-t-11-express","color":"#e2562e","system_id":296,"system_name":"Tramway d'Île-de-France","transport_mode_id":5,"transport_mode_name":"light_rail"},{"id":392,"name":"T 12","url_name":"392-t-12","color":"#a02a3a","system_id":296,"system_name":"Tramway d'Île-de-France","transport_mode_id":5,"transport_mode_name":"light_rail"},{"id":393,"name":"T 13","url_name":"393-t-13","color":"#885f30","system_id":296,"system_name":"Tramway d'Île-de-France","transport_mode_id":5,"transport_mode_name":"light_rail"},{"id":400,"name":"T Zen 1","url_name":"400-t-zen-1","color":"#c6cd01","system_id":301,"system_name":"TZen","transport_mode_id":6,"transport_mode_name":"brt"},{"id":401,"name":"T Zen 2","url_name":"401-t-zen-2","color":"#c6cd01","system_id":301,"system_name":"TZen","transport_mode_id":6,"transport_mode_name":"brt"},{"id":402,"name":"T Zen 3","url_name":"402-t-zen-3","color":"#c6cd01","system_id":301,"system_name":"TZen","transport_mode_id":6,"transport_mode_name":"brt"},{"id":403,"name":"T Zen 4","url_name":"403-t-zen-4","color":"#c6cd01","system_id":301,"system_name":"TZen","transport_mode_id":6,"transport_mode_name":"brt"},{"id":404,"name":"T Zen 5","url_name":"404-t-zen-5","color":"#c6cd01","system_id":301,"system_name":"TZen","transport_mode_id":6,"transport_mode_name":"brt"},{"id":409,"name":"Tuileries-Suresnes","url_name":"409-tuileries-suresnes","color":"#000","system_id":303,"system_name":"Navettes fluviales","transport_mode_id":0,"transport_mode_name":"default"},{"id":388,"name":"U","url_name":"388-u","color":"#d60058","system_id":298,"system_name":"Transilien","transport_mode_id":2,"transport_mode_name":"inter_city_rail"},{"id":408,"name":"Voguéo","url_name":"408-vogueo","color":"#99d420","system_id":303,"system_name":"Navettes fluviales","transport_mode_id":0,"transport_mode_name":"default"}]
So I managed to find how do extract part of the data you want to use / analyse.
You should simply call the column you are trying to extract (in my case system_name) and give its value (in my case "Métro de Paris"). Here The dataframe, data, will now have the data with value "Métro de Paris" form the column "system_name".
data = data[data.system_name == "Métro de Paris"]
I am trying to decode this string with python by using the JSON module but I keep getting this error I do not know what is the problem I will appreciate any help with this
here is my code
print(json.loads(data))
i get this error raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 1 column 38284 (char 38283)
here is the string
data = "{"config":{"csrf_token":"C32Czt1OaAEPfa0yfnexUwIfpRisDbEn","viewer":null,"viewerId":null},"country_code":"AE","language_code":"en","locale":"en_US","entry_data":{"ProfilePage":[{"logging_page_id":"profilePage_501391458","show_suggested_profiles":false,"show_follow_dialog":false,"graphql":{"user":{"biography":"AMEM, sem acento pra amar mais. \n\ud83d\udce9 brendamoniiique#gmail.com \n\ud83d\udcf7\ud83c\udfad\nSnap: brendamoniiique \ud83d\udc7b\nTwitter: brenndamonique \nSe inscreva no canal!\nV\u00eddeo novo \u2b07\ufe0f","blocked_by_viewer":false,"country_block":false,"external_url":"https://m.youtube.com/watch?v=rbQXKj8fgY4","external_url_linkshimmed":"https://l.instagram.com/?u=https%3A%2F%2Fm.youtube.com%2Fwatch%3Fv%3DrbQXKj8fgY4\u0026e=ATNF-ClUCsPTnGqme96AMWs934pGkHIP89zemVqEdVXLGs1DCPVyGA0_OkiLhLCwGDnk7nyP","edge_followed_by":{"count":513368},"followed_by_viewer":false,"edge_follow":{"count":610},"follows_viewer":false,"full_name":"Brenda Monique","has_channel":false,"has_blocked_viewer":false,"highlight_reel_count":4,"has_requested_viewer":false,"id":"501391458","is_business_account":true,"is_joined_recently":false,"business_category_name":"Creators \u0026 Celebrities","is_private":false,"is_verified":false,"edge_mutual_followed_by":{"count":0,"edges":[]},"profile_pic_url":"https://instagram.fauh1-1.fna.fbcdn.net/vp/c2f9a7480743127046dd6d77bd4d0616/5E341F01/t51.2885-19/s150x150/70377448_2518104848237245_4413369807659859968_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net","profile_pic_url_hd":"https://instagram.fauh1-1.fna.fbcdn.net/vp/9c2092522304ee52cd557e4ba41b96da/5E31A379/t51.2885-19/s320x320/70377448_2518104848237245_4413369807659859968_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net","requested_by_viewer":false,"username":"brenda","connected_fb_page":null,"edge_felix_video_timeline":{"count":2,"page_info":{"has_next_page":false,"end_cursor":null},"edges":[{"node":{"__typename":"GraphVideo","id":"2101210976602167456","edge_media_to_caption":{"edges":[{"node":{"text":"Mais medo do que dor.\nM\u00e3os de fada #fabipiercerr\n#brazillianinktattoo\nDesculpa por quebrar sua m\u00e3o amigo! #putzronan"}}]},"shortcode":"B0pAEAihhig","edge_media_to_comment":{"count":127},"comments_disabled":false,"taken_at_timestamp":1564704112,"dimensions":{"height":1333,"width":750},"display_url":"https://instagram.fauh1-1.fna.fbcdn.net/vp/5bfebfd491f455e858f84367ae184874/5DA294E2/t51.2885-15/e35/66085352_866623317056051_5414623747182996505_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=111","edge_liked_by":{"count":3834},"edge_media_preview_like":{"count":3834},"location":null,"gating_info":null,"fact_check_information":null,"media_preview":"ABcqdtXOcnmiS3Mo+8V9OP51m+a7dOMVcSaUrnjIrOxtcljEg4bnHpyKKdHvGd/GecfWipsVczVU1MhZt30/z/Wkb5Vqa2cLVmZcdsqMckfyoqOFPkJ7n/PHtRSGynIhxTE+U1LcHnFOhHWmJ6EyM/fgelFOopkXZ//Z","owner":{"id":"501391458","username":"brenda"},"thumbnail_src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/14eaf49f6749eb775bd06dd9a6ab20e7/5DA2D353/t51.2885-15/sh0.08/e35/c0.280.720.720a/s640x640/66085352_866623317056051_5414623747182996505_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=111","thumbnail_resources":[{"src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/a5b2166d543ae26bf279f7326187ab72/5DA2B5B3/t51.2885-15/e35/p150x150/66085352_866623317056051_5414623747182996505_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=111","config_width":150,"config_height":266},{"src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/5c3b72b09f6f0d137a55d75d13786ec1/5DA2AD39/t51.2885-15/e35/p240x240/66085352_866623317056051_5414623747182996505_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=111","config_width":240,"config_height":426},{"src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/fdf871515a02848f72391ae8535ebba1/5DA32EC3/t51.2885-15/e35/p320x320/66085352_866623317056051_5414623747182996505_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=111","config_width":320,"config_height":568},{"src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/6d622d9e9bb0c8337558df56bdf7ecf7/5DA296D9/t51.2885-15/e35/p480x480/66085352_866623317056051_5414623747182996505_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=111","config_width":480,"config_height":853},{"src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/a340f0feacd2c9d33972ae503e9fe8e5/5DA2BF94/t51.2885-15/sh0.08/e35/p640x640/66085352_866623317056051_5414623747182996505_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=111","config_width":640,"config_height":1137}],"is_video":true,"felix_profile_grid_crop":null,"encoding_status":null,"is_published":true,"product_type":"igtv","title":"Rea\u00e7\u00e3o ao piercing no mamilo.","video_duration":90.166,"video_view_count":55717}},{"node":{"__typename":"GraphVideo","id":"1823351818219301394","edge_media_to_caption":{"edges":[{"node":{"text":"Trabalhar com o que a gente ama com pessoas especiais, se torna lazer, amei conhecer voc\u00eas de pertinho, sempre admirei de longe essa marca incr\u00edvel. Obrigada por tudo! \ud83d\udc95"}}]},"shortcode":"BlN2NFxhioS","edge_media_to_comment":{"count":6},"comments_disabled":false,"taken_at_timestamp":1531580895,"dimensions":{"height":1333,"width":750},"display_url":"https://instagram.fauh1-1.fna.fbcdn.net/vp/1f57785fbd076dca649e5102f0192b77/5DA2D10C/t51.2885-15/e15/36693531_244321656367003_7741952793291784192_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=107","edge_liked_by":{"count":131},"edge_media_preview_like":{"count":131},"location":null,"gating_info":null,"fact_check_information":null,"media_preview":"ABcqsG7t+gjX8l/wphuYv+ecf4gf4VnRx55/HHrUipn7wGScUDJ45UUksqtn2Ax+YoqIR9sYP0/xopDLMUDKFc87v5fT39KdPgfeAU84HfParK2UgI3EEDoRn+XrVhrSNj0565/xoAxYpWU5f5qK05LT05FFAjUppFcgLub/AJ6P/wB9N/jS/apv+ej/APfR/wAadhXOrbjk8UVyMlzKwwXYj3Y/40UWA//Z","owner":{"id":"501391458","username":"brenda"},"thumbnail_src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/bd94e68a518e0b0ea7316a49b986bec8/5DA2A283/t51.2885-15/e15/c0.280.720.720a/s640x640/36693531_244321656367003_7741952793291784192_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=107","thumbnail_resources":[{"src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/25da56b2753e22ecc42d147b07fdc276/5DA3187E/t51.2885-15/e15/p150x150/36693531_244321656367003_7741952793291784192_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=107","config_width":150,"config_height":266},{"src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/17690357faeffc9e83295cc70ce7e40a/5DA3B774/t51.2885-15/e15/p240x240/36693531_244321656367003_7741952793291784192_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=107","config_width":240,"config_height":426},{"src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/b814c6604fa781e7938c7bf042a659d4/5DA3164E/t51.2885-15/e15/p320x320/36693531_244321656367003_7741952793291784192_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=107","config_width":320,"config_height":568},{"src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/3eb4aced5cc8e8f56e366a1c0a9b991f/5DA2AF54/t51.2885-15/e15/p480x480/36693531_244321656367003_7741952793291784192_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=107","config_width":480,"config_height":853},{"src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/721b0507afb4d563d3fddb158eccafce/5DA33021/t51.2885-15/e15/p640x640/36693531_244321656367003_7741952793291784192_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=107","config_width":640,"config_height":1137}],"is_video":true,"felix_profile_grid_crop":null,"encoding_status":null,"is_published":true,"product_type":"igtv","title":"Um pouco do making of pro #mundololita","video_duration":267.383,"video_view_count":9341}}]},"edge_owner_to_timeline_media":{"count":2946,"page_info":{"has_next_page":true,"end_cursor":"QVFDNUNoSHpDQndEb0pRUXpOel9WckNxa3lkTEM4MXo3eFRPUm1oc0F6emplejFsekxUU1VZcWYyZmM5MUE1NDdacXpSMllJWC0tN1NwU1RJSkt5eWhyVA=="},"edges":[{"node":{"__typename":"GraphImage","id":"2151922486391153093","edge_media_to_caption":{"edges":[{"node":{"text":"Indo ali de #instatoiss \nJ\u00e1 t\u00f4 vendo essa cal\u00e7a andando sozinha, tudo pra mim kkkkk"}}]},"shortcode":"B3dKhmZhSHF","edge_media_to_comment":{"count":90},"comments_disabled":false,"taken_at_timestamp":1570749172,"dimensions":{"height":1349,"width":1080},"display_url":"https://instagram.fauh1-1.fna.fbcdn.net/vp/3ca56d6a02107b9829a481f384325796/5E372923/t51.2885-15/e35/p1080x1080/70238656_381298339415147_2571910151171428889_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=111","edge_liked_by":{"count":7420},"edge_media_preview_like":{"count":7420},"location":null,"gating_info":null,"fact_check_information":null,"media_preview":"ACEqsxpgVKWCjJ4A600GlzUJltEUU/m54K49e4PQ08mo5isL7QMDH3vf0P17AdKbvzVJ3JasPopm6igkcrUyZyEOOuOMdc9qeIX7YP0NVrstGhzwSOM/0rNGzKLBmbaTkgDknPOM9auRy7xnv3rPgO5sHn/9VXxgDjitDJkuaKi3UUCNFH39sVnXwMpEa545z2+n/wBetYdKY1cq0dzqeqsY9rC0TbzjkdCM/wA6unaeqj8Mj+VTmmGtOZmfKiLan90/99UUtFHMw5Uf/9k=","owner":{"id":"501391458","username":"brenda"},"thumbnail_src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/82533b55cf2c0e1ca87bdf6496f73ec1/5E23AADE/t51.2885-15/sh0.08/e35/c0.179.1440.1440a/s640x640/70238656_381298339415147_2571910151171428889_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=111","thumbnail_resources":[{"src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/0ef643f0287638e3c2e533b7bb234bcd/5E34D815/t51.2885-15/e35/c0.179.1440.1440a/s150x150/70238656_381298339415147_2571910151171428889_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=111","config_width":150,"config_height":150},{"src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/9221f2f4083889a8e77b99ccac4a19bc/5E36C45F/t51.2885-15/e35/c0.179.1440.1440a/s240x240/70238656_381298339415147_2571910151171428889_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=111","config_width":240,"config_height":240},{"src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/0082899f6ec15fac43a9ce521de1d5c2/5E2C94E5/t51.2885-15/e35/c0.179.1440.1440a/s320x320/70238656_381298339415147_2571910151171428889_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=111","config_width":320,"config_height":320},{"src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/34c96b00697e413879fab9fd193fda58/5E2645BF/t51.2885-15/e35/c0.179.1440.1440a/s480x480/70238656_381298339415147_2571910151171428889_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=111","config_width":480,"config_height":480},{"src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/82533b55cf2c0e1ca87bdf6496f73ec1/5E23AADE/t51.2885-15/sh0.08/e35/c0.179.1440.1440a/s640x640/70238656_381298339415147_2571910151171428889_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=111","config_width":640,"config_height":640}],"is_video":false,"accessibility_caption":"Image may contain: one or more people and people standing"}},{"node":{"__typename":"GraphImage","id":"2151209103723397535","edge_media_to_caption":{"edges":[{"node":{"text":"Oi, te liguei, deve t\u00e1 ocupadinho..."}}]},"shortcode":"B3aoUhBBQGf","edge_media_to_comment":{"count":142},"comments_disabled":false,"taken_at_timestamp":1570664130,"dimensions":{"height":1349,"width":1080},"display_url":"https://instagram.fauh1-1.fna.fbcdn.net/vp/529341a58c35678dd5bb0b55c922e610/5E216D5D/t51.2885-15/e35/p1080x1080/70242699_356069325136465_6184163639773416753_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=101","edge_liked_by":{"count":10196},"edge_media_preview_like":{"count":10196},"location":null,"gating_info":null,"fact_check_information":null,"media_preview":"ACEqxWIlYKuR2xV1IVY9CVBwMdf8+pqlEMOPx/wrSQs2FXpmueTtojSKH3yeZGGZtpThRnOceuBwcYrN85goQBecc4546c/zPep7mObO8jCjuP60RxI8TkkBgAQD7A/z9KaeiuS1qVN7e1FO3Q+j/mKKq3kIbGMN9RWlbOVfPqDx+NZr53ddxU4B6dD/AFrQtypkKknIx71E9fuNImoQJ1aM9cf5Nc+IHXCkYLHH45weK2rmU27I56E7Sfb/ADzTdQieRY5E5UnHuC3Gc+n9amN1oEu5Q2f7X6UUz7E/9/8AnRVWXf8AAi4sjRMfkHToMDJP8607eOOCMM4y5JJ9T7fQVk24/eJ9RV/+I/Wpb5dPLr6lpXJb64WWIqV2kYKkc8+hH+FR2ExaIwyco2QCOo//AFdjUMp5H1H86jnUCPcAA3PPf86cfeQnoN+wH+9+hoqLzX/vH8zRU80u/wCBVkf/2Q==","owner":{"id":"501391458","username":"brenda"},"thumbnail_src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/048c2ee17e60ab95080895ddecc21b90/5E368056/t51.2885-15/sh0.08/e35/c0.169.1357.1357a/s640x640/70242699_356069325136465_6184163639773416753_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=101","thumbnail_resources":[{"src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/c6aa3ffc4536d3567d97189d48355a37/5E325C9D/t51.2885-15/e35/c0.169.1357.1357a/s150x150/70242699_356069325136465_6184163639773416753_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=101","config_width":150,"config_height":150},{"src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/b34da1ac4ba66b1151e1baa1f01317a2/5E32B1D7/t51.2885-15/e35/c0.169.1357.1357a/s240x240/70242699_356069325136465_6184163639773416753_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=101","config_width":240,"config_height":240},{"src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/edc0beac13959ce8dc870b82c35e2588/5E3E526D/t51.2885-15/e35/c0.169.1357.1357a/s320x320/70242699_356069325136465_6184163639773416753_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=101","config_width":320,"config_height":320},{"src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/64f75b7c4d0df242617adae8627a0f5b/5E26AF37/t51.2885-15/e35/c0.169.1357.1357a/s480x480/70242699_356069325136465_6184163639773416753_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=101","config_width":480,"config_height":480},{"src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/048c2ee17e60ab95080895ddecc21b90/5E368056/t51.2885-15/sh0.08/e35/c0.169.1357.1357a/s640x640/70242699_356069325136465_6184163639773416753_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=101","config_width":640,"config_height":640}],"is_video":false,"accessibility_caption":"Image may contain: one or more people, outdoor and closeup"}},{"node":{"__typename":"GraphImage","id":"2150405593951985561","edge_media_to_caption":{"edges":[{"node":{"text":"\"A t\u00e1, espera sentada\"\nEu:"}}]},"shortcode":"B3Xxn6OhV-Z","edge_media_to_comment":{"count":802},"comments_disabled":false,"taken_at_timestamp":1570568344,"dimensions":{"height":1350,"width":1080},"display_url":"https://instagram.fauh1-1.fna.fbcdn.net/vp/371a801c4dd8565983d31dae77a7a46a/5E2E1FB6/t51.2885-15/e35/p1080x1080/70631980_551728168916322_5285310180508753159_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=106","edge_liked_by":{"count":21130},"edge_media_preview_like":{"count":21130},"location":null,"gating_info":null,"fact_check_information":null,"media_preview":"ACEqy1JzxTjkU+FgvJqSQhh1yf8APWpNLaEQXimMpXjpUkjFeR7flUOS5/z0oATaPWik8s+o/MUUCNc2kIByHG0A5B65+oqPyIo5HOPliAOMnn0qaVy7EbgU4wMgfmDineX5ryrnCyAANwRkUrg0VLiaKRBtGxxxtHIx9elWra3Uw7XxulBIz1/D+f41F9lUMqjO5jg4HGB1PTv2q680KPy2Cny47D6f1oGYn2Z/7rf5/Ciul3e/60UwKZjVuvP1o8lP7op4604VBRH5S9sj6E0wxnsx/EA/0qftTDQAzbJ/f/8AHRRTdx9aKQ7H/9k=","owner":{"id":"501391458","username":"brenda"},"thumbnail_src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/6dfa5b245a877c09912f39e9910d2efe/5E34C425/t51.2885-15/sh0.08/e35/c0.180.1440.1440a/s640x640/70631980_551728168916322_5285310180508753159_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=106","thumbnail_resources":[{"src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/54cc65174f8394932794d42d8d1f684d/5E2A25EE/t51.2885-15/e35/c0.180.1440.1440a/s150x150/70631980_551728168916322_5285310180508753159_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=106","config_width":150,"config_height":150},{"src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/cec09eb33e9b96a85b603d46d85aaad5/5E324EA4/t51.2885-15/e35/c0.180.1440.1440a/s240x240/70631980_551728168916322_5285310180508753159_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=106","config_width":240,"config_height":240},{"src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/20a770913704443078747a9e9093f74a/5E64EF1E/t51.2885-15/e35/c0.180.1440.1440a/s320x320/70631980_551728168916322_5285310180508753159_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=106","config_width":320,"config_height":320},{"src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/bca82bcd7c5f8d4900b2c34bf6df8fad/5E2B1744/t51.2885-15/e35/c0.180.1440.1440a/s480x480/70631980_551728168916322_5285310180508753159_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=106","config_width":480,"config_height":480},{"src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/6dfa5b245a877c09912f39e9910d2efe/5E34C425/t51.2885-15/sh0.08/e35/c0.180.1440.1440a/s640x640/70631980_551728168916322_5285310180508753159_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=106","config_width":640,"config_height":640}],"is_video":false,"accessibility_caption":"Image may contain: one or more people and outdoor"}},{"node":{"__typename":"GraphImage","id":"2149505334816215859","edge_media_to_caption":{"edges":[{"node":{"text":"#nickelback te amo!"}}]},"shortcode":"B3Uk7akhxMz","edge_media_to_comment":{"count":67},"comments_disabled":false,"taken_at_timestamp":1570461025,"dimensions":{"height":1349,"width":1080},"display_url":"https://instagram.fauh1-1.fna.fbcdn.net/vp/53c49e922b6f22c28764a121f8d190b8/5E30FAD9/t51.2885-15/e35/p1080x1080/70420951_2405711506371805_6496679180222382909_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=101","edge_liked_by":{"count":8399},"edge_media_preview_like":{"count":8399},"location":null,"gating_info":null,"fact_check_information":null,"media_preview":"ACEqwiMdaAM8VdkjDRh++Mcf1+nNQI21WQjO7BB7gj0pdLj62H3UBhbnnIquKuSt50Skn50yDnuM8fWiKNfMGO3JHuP5iktdOoPTXp95UwfQ0Vsea/8AeP5Ciq5ZdieeH834FB5t+/8A3tw/E/4VE0mcrjqQfy/xqSSPysbfmDqCCf6VLCiBHeQbiMYz6moukXZtlPt71Mku05Pfpj61POiGFHQbSchsetUnI7cf5/zxVJ3E109DR3p/fFFZdFVzS7sjkh/KvxLsoJVPRQRn9aN2I9nqcn8KbnPJ5qzIAIxgf55rI1Ig37pl9WBqFTtOcZB4I9R/T60p6j6f1opi3JM2/wDzyP8A32aKjoouB//Z","owner":{"id":"501391458","username":"brenda"},"thumbnail_src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/7872efc8a47865b7bd14838094606f95/5E19F499/t51.2885-15/sh0.08/e35/c0.179.1440.1440a/s640x640/70420951_2405711506371805_6496679180222382909_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=101","thumbnail_resources":[{"src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/865947c3c59bba5c53fa86b9ce026bcb/5E2E87A9/t51.2885-15/e35/c0.179.1440.1440a/s150x150/70420951_2405711506371805_6496679180222382909_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=101","config_width":150,"config_height":150},{"src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/5a6004950067ba7bbaf15e2b4eb61a55/5E1EA8AF/t51.2885-15/e35/c0.179.1440.1440a/s240x240/70420951_2405711506371805_6496679180222382909_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=101","config_width":240,"config_height":240},{"src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/991ce70d66048efe2d80e5daf6eba147/5E2A42D1/t51.2885-15/e35/c0.179.1440.1440a/s320x320/70420951_2405711506371805_6496679180222382909_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=101","config_width":320,"config_height":320},{"src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/540e2aaa394797a6368f728cdfe23382/5E341D96/t51.2885-15/e35/c0.179.1440.1440a/s480x480/70420951_2405711506371805_6496679180222382909_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=101","config_width":480,"config_height":480},{"src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/7872efc8a47865b7bd14838094606f95/5E19F499/t51.2885-15/sh0.08/e35/c0.179.1440.1440a/s640x640/70420951_2405711506371805_6496679180222382909_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=101","config_width":640,"config_height":640}],"is_video":false,"accessibility_caption":"Image may contain: one or more people, people standing and shoes"}},{"node":{"__typename":"GraphImage","id":"2148823031496514609","edge_media_to_caption":{"edges":[{"node":{"text":"\ud83c\udfa1"}}]},"shortcode":"B3SJymFhxwx","edge_media_to_comment":{"count":115},"comments_disabled":false,"taken_at_timestamp":1570379688,"dimensions":{"height":1245,"width":1080},"display_url":"https://instagram.fauh1-1.fna.fbcdn.net/vp/728146994169a3abf64aa9495ce8c13e/5E650113/t51.2885-15/e35/p1080x1080/71535757_189341858761917_81076465584500668_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=109","edge_liked_by":{"count":14124},"edge_media_preview_like":{"count":14124},"location":{"id":"129662805","has_public_page":true,"name":"Rock in Rio","slug":"rock-in-rio"},"gating_info":null,"fact_check_information":null,"media_preview":"ACQqftppWreymFa6rnBytlcgqMgE/SiKVXO3kN6H+lWEA5YdGHeqBULMgRt2WH069vwrlVZylbodrw6jG/W2po7KKs7aK3uc/KIygDnge9QMBnIYYHXpVF7ksA2AecEcnp+nNOMhmfaPu9hx1Hf6eormczrUF3/plkeWzjbk8c9cD0xmq2EEykDgN8zdunA+nH50xpRECM5z3z1J7cenc9qeFCkKx79KwvZ8x1ct1yt7Gm04BwBux15oqnsCcL0PNFV7RiVKPUyi4HC8n1/+vTdpZS6nkce5z6f4elR/wfjVqH/VH/fH8jWj0OWOrsZqHBz1rQtZDM4zyVGB9KpzjDVc0v8A1h+lEtrmkdHYuTbw34UVNJ96iuc6j//Z","owner":{"id":"501391458","username":"brenda"},"thumbnail_src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/7937f2b225ddebbb23725bf46c479048/5E3720D9/t51.2885-15/sh0.08/e35/c0.110.1440.1440a/s640x640/71535757_189341858761917_81076465584500668_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=109","thumbnail_resources":[{"src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/c68c881947b03e7f381d95a3993e53a9/5E1CD3EA/t51.2885-15/e35/c0.110.1440.1440a/s150x150/71535757_189341858761917_81076465584500668_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=109","config_width":150,"config_height":150},{"src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/7956089002e131809afafc0cc263759e/5E208E07/t51.2885-15/e35/c0.110.1440.1440a/s240x240/71535757_189341858761917_81076465584500668_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=109","config_width":240,"config_height":240},{"src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/b0cfd38b4b392314b6a0798ebba57189/5E2D1014/t51.2885-15/e35/c0.110.1440.1440a/s320x320/71535757_189341858761917_81076465584500668_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=109","config_width":320,"config_height":320},{"src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/30bdb0cdc454d3436f5a3b6c760e3846/5E26ED08/t51.2885-15/e35/c0.110.1440.1440a/s480x480/71535757_189341858761917_81076465584500668_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=109","config_width":480,"config_height":480},{"src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/7937f2b225ddebbb23725bf46c479048/5E3720D9/t51.2885-15/sh0.08/e35/c0.110.1440.1440a/s640x640/71535757_189341858761917_81076465584500668_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=109","config_width":640,"config_height":640}],"is_video":false,"accessibility_caption":"Image may contain: one or more people, sky and outdoor"}},{"node":{"__typename":"GraphImage","id":"2148203493067266103","edge_media_to_caption":{"edges":[{"node":{"text":"C\u00eas pensaram que eu n\u00e3o ia rebolar minha bunda hoje?!... \ud83d\udd25"}}]},"shortcode":"B3P87H9hxg3","edge_media_to_comment":{"count":49},"comments_disabled":false,"taken_at_timestamp":1570305833,"dimensions":{"height":1174,"width":1080},"display_url":"https://instagram.fauh1-1.fna.fbcdn.net/vp/ac9af9e9ccc13e8f3a7dea7f7c428727/5E21F612/t51.2885-15/e35/p1080x1080/69802783_931862850513383_368990004099701710_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=111","edge_liked_by":{"count":8066},"edge_media_preview_like":{"count":8066},"location":{"id":"129662805","has_public_page":true,"name":"Rock in Rio","slug":"rock-in-rio"},"gating_info":null,"fact_check_information":null,"media_preview":"ACcqtbaYRVopTGXFdFzjcSrtz9aNmKQuDkqQ2egyOw/TJqbac5YHvzx/+upU77dy3Stuun49iMLRUwGeaKu5nykv2mLONwqOS4TBHUdPTrx3+tUiv4ULEGOCSByT9BXHzs7+RMit0EXGMsCcH2xz/jz69KnN3FsAOeDkAflg1D5geQMBwAevfA79s1EGqU2mOVrabf5F1r2MDC5HAwevf39qKol8e34UVfMzOyJsleWz+PzD8xyPxFRtc4II5Oe3I6Y/r3xVt+KypuJfyqFqavTYej7D68EfTIx/WnA1XXqfqKmFNogduophooA//9k=","owner":{"id":"501391458","username":"brenda"},"thumbnail_src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/0d5cd5d6f91db7f88634465cad3806d6/5E22490D/t51.2885-15/sh0.08/e35/c0.63.1440.1440a/s640x640/69802783_931862850513383_368990004099701710_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=111","thumbnail_resources":[{"src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/636d9dd6d0d2c444f1e4c5240e23bd6a/5E222C9A/t51.2885-15/e35/c0.63.1440.1440a/s150x150/69802783_931862850513383_368990004099701710_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=111","config_width":150,"config_height":150},{"src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/c1890a64231dfc28ffcc517fe696ae34/5E2BC02F/t51.2885-15/e35/c0.63.1440.1440a/s240x240/69802783_931862850513383_368990004099701710_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=111","config_width":240,"config_height":240},{"src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/1a9d284566fa6e4236f094ed20e8f076/5E1B4497/t51.2885-15/e35/c0.63.1440.1440a/s320x320/69802783_931862850513383_368990004099701710_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=111","config_width":320,"config_height":320},{"src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/8e8e37178c4ebd012c4d341273a28df9/5E1C05CB/t51.2885-15/e35/c0.63.1440.1440a/s480x480/69802783_931862850513383_368990004099701710_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=111","config_width":480,"config_height":480},{"src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/0d5cd5d6f91db7f88634465cad3806d6/5E22490D/t51.2885-15/sh0.08/e35/c0.63.1440.1440a/s640x640/69802783_931862850513383_368990004099701710_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=111","config_width":640,"config_height":640}],"is_video":false,"accessibility_caption":"Image may contain: one or more people, people standing, shoes, sky and outdoor"}},{"node":{"__typename":"GraphImage","id":"2148079208868813396","edge_media_to_caption":{"edges":[{"node":{"text":"\u2764\ufe0f"}}]},"shortcode":"B3PgqjSBxpU","edge_media_to_comment":{"count":81},"comments_disabled":false,"taken_at_timestamp":1570291018,"dimensions":{"height":980,"width":1080},"display_url":"https://instagram.fauh1-1.fna.fbcdn.net/vp/c80bb71715ee9d66d9742ea3398b3d0e/5E29B0E0/t51.2885-15/e35/s1080x1080/71512385_1294895257350424_3860920299024042991_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=104","edge_liked_by":{"count":11192},"edge_media_preview_like":{"count":11192},"location":null,"gating_info":null,"fact_check_information":null,"media_preview":"ACom13uFiAL556cVKk28BlBIPuB/Wsy+/wBWD6N/iKnsHzEPYkVFyy9vb0/X/wCtTSznpt/M/wCFULu6kiJCDtnOM1Tt7maTndjjngf4UuYfKbJ399uPbOf51JVeN9yZyW9z/wDWqfIpiMy+/wBWw9CD+v8A9emac/7sj0an3nKsPVc/l/8Aqqlp743D6GpK6mjdN8n481nsyAllGMYKj0x1q8ZMA1lN8vI+VvTt7nP9Kh7mi2NmI4jGeOM/nzVqs/zMj6irwFWiGUbrp9VIrM09S77R1Iooo7ie6Nn7Mp4JJ/T/ABqKSwRwMkjnPY/4UUUWC5E6GNip54zxWip4H0oopIZ//9k=","owner":{"id":"501391458","username":"brenda"},"thumbnail_src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/f0546a4183139ecfcf0b6d094342af01/5E1F2DD8/t51.2885-15/sh0.08/e35/c66.0.1307.1307a/s640x640/71512385_1294895257350424_3860920299024042991_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=104","thumbnail_resources":[{"src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/44b63ad614c7a2206df0fdb0c0a2be81/5E38514F/t51.2885-15/e35/c66.0.1307.1307a/s150x150/71512385_1294895257350424_3860920299024042991_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=104","config_width":150,"config_height":150},{"src":"https://instagram.fauh1-1.fna.fbcdn.net/vp/28ec1778b5d5a5764b640fdff171220c/5E369449/t51.2885-15/e35/c66.0.1307.1307a/s240x240/71512385_1294895257350424_3860920299024042991_n.jpg?_nc_ht=instagram.fauh1-1.fna.fbcdn.net\u0026_nc_cat=104"}"
Your string is not a valid JSON, it is missing many closing brackets. You can use a JSON validator online such as https://jsonformatter.curiousconcept.com that will show you all the errors.
To be more specific add ]}}]}}}}]}} at the end of your string and you are good to go.
I use TRESTClient, TRESTRequest, FRESTResponse and RESTResponseDataSetAdapter like in RESTDebugger (Delphi Tokyo) and it works fine but for one JSONValue the webservice send me some HTML mix and It do not display the right thing in my TFDMemTable.
I make the same test with JSONViewer and it make the same things
Is there a way to modify my JSONStream just before it start to parse my RestReponse ?
Why it don't display all my JSONString for dev_msg_attention_to_garage ?
{"id_commande":"15672","id_devis":"16347","status":"CONFIRM","res_codres":"IDG","nom_client":"TESTRDV","prenom_client":"toto","mail":"test#test.fr","tel_port":"0606060606","date_prise_rdv":"2017-09-25 09:25:43.281269","date_rdv":"2017-09-27","heure_rdv":"17:30-18:00","immatriculation":"EC620XP ","type_prestation":"FREINAGE","famille":"Disques et plaquettes avant","type_mine":"","codmar":"PEUG","numord":"9938","marque":"PEUGEOT","marque_modele":"PEUGEOT 206 1.1 60CV","cnit":"MPE1002K6315","aaa_caliloca":null,"aaa_cape":null,"aaa_ccreditbail":null,"aaa_canton":null,"aaa_carrosserie":"BERLINE","aaa_carrosseriecg":"CI","aaa_catclient":null,"aaa_catclientvo":null,"aaa_catvendeur":null,"aaa_co2":"154","aaa_codifvin":"VF32AHFZE40061368","aaa_consexurb":"5.1","aaa_consmixte":"6.2","aaa_consurb":"8.2","aaa_couleurvehic":"MARRON","aaa_cstrvincg":null,"aaa_cylindree":"1124","aaa_date1ercir":"1998-10-15","aaa_datedcg":"2016-06-09","aaa_datedcgachat":null,"aaa_datedcgpr":null,"aaa_datedcgprachat":null,"aaa_depart":null,"aaa_departement":null,"aaa_depollution":"NON","aaa_empat":"245.0","aaa_empreintesol":null,"aaa_energie":"ESSENCE","aaa_gammemarche":null,"aaa_genrev":"VP","aaa_genrevcg":"VP","aaa_hauteur":"144","aaa_immatsiv":"EC620XP","aaa_largeur":"165","aaa_longueur":"384","aaa_marque":"PEUGEOT","aaa_marquecarros":"PEUGEOT","aaa_modeinject":"AUTR. CARBURATIONS","aaa_moderefroid":null,"aaa_modele":"206","aaa_modeleetude":"206","aaa_modeleprf":"206","aaa_mouvmt":null,"aaa_nserie":"40061368","aaa_nsiren":"000000000","aaa_nbcylind":"4","aaa_nbdecibels":null,"aaa_nbmain":null,"aaa_nbplass":"5","aaa_nbportes":"5","aaa_nbpropriet":null,"aaa_nbsoupape":"2","aaa_nbvitesse":"5","aaa_nbvolume":"2","aaa_nuancecouleur":null,"aaa_poidsvide":"910","aaa_prixvehic":"0","aaa_propulsion":"AVANT","aaa_ptr":"1405","aaa_ptrprf":"0192","aaa_puisch":"60","aaa_puisfisc":"5","aaa_rappuispoids":null,"aaa_regionadmin":null,"aaa_regmdecibels":null,"aaa_statutimmat":null,"aaa_temoincession":null,"aaa_tpboitevit":"MECANIQUE","aaa_transmiss":null,"aaa_turbocompr":"NON TURBO","aaa_type":"MPE1002K6315","aaa_typevincg":"2AHFZE","aaa_version":"XR\/PRESE","aaa_voiear":null,"aaa_voieav":null,"aaa_datews":"2017-06-16","aaa_3lnom":"fff","veh_codmar":null,"veh_numord":null,"veh_ktypenr":null,"aaa_pneus":"175\/65 R14 82 T, 165\/70 R13 79 T","aaa_typevarversprf":"2AHFZE","aaa_codemoteur":"HFZ","aaa_puiskw":"44","total_ht":"141.58","total_tva":"28.32","total_ttc":"169.90","total_ttc_max":"169.90","total_ttc_min":"169.90","dev_msg_attention_to_garage":" \r\n \r\n \r\n attention\r\n \r\n ATTENTION Pour ce rendez-vous web nous avons identifié\r\n plusieurs références constructeur possible :<\/br\/>\r\n 4249A5, <b>424995<\/b><br\/> \r\n <br \/>Vous devez vous assurer que la\r\n référence indiquée correspond bien à\r\n celle montée sur le véhicule du client <br \/>Le\r\n prix final à payer par le client doit être de 169,90 \u20AC TTC \r\n \r\n \r\n\t\r\n \/ Le devis est en pi\u00E8ce budget","dev_msg_from_customer":"test message;\r\n","id":"15672","created_at":"2017-09-25 09:25:43.460187","updated_at":"2017-09-25 09:26:10.621387","coupon":[],"promotion_globale":[],"lignes_pieces":[{"codfam":"FDI","ssfam":"AV","designation_piece":"DISQUE DE FREIN AV PLEIN. DIAMETRE= 247X10MM","ref_constructeur":"424995","quantity":"2.00","remise":"0.00","pu":"0.00","taux_tva":null},{"codfam":"FPL","ssfam":"AV","designation_piece":"PLAQUETTES DE FREIN AV. MONTAGE BOSCH","ref_constructeur":"425320","quantity":"1.00","remise":"0.00","pu":"0.00","taux_tva":null}],"lignes_mo":[{"type_ligne":"FOI","designation_mo":"Forfait Isotech ","ref_operation_adauto":"FISOAD16990","quantity":"1.00","taux_horaire":"141.58","remise":null,"code_taux_horaire":null,"taux_tva":1.2,"montant_ht_ligne_apres_remise":141.58}],"deduction_rdv_en_ligne_ttc":"16.99","montant_a_regler_par_client":152.91,"pourcentage_remise_calculee_pieces":0,"total_remises":0,"total_ht_avant_remises":141.58,"pourcentage_remises":0,"pourcentage_remise_calculee_mo":0}
You are being presented with a limitation of Windows' Tree View. From the documentation:
Note that although the tree-view control allows any length string to be stored as item text, only the first 260 characters are displayed.
(Emphasis mine)
The quick answer is that since this control wraps Delphi's TTreeView implementation, it also inherits this limitation, and thus there's not too much you can do to overcome it, besides either implementing custom drawing or finding another control without this limitation.
I'm trying to iterate twitter data which is stored in a json file:
fname = 'test.json'
with open(fname, 'r') as f:
for line in f:
tweet = json.loads(line)['text']
print(tweet)
It prints the first tweet in the file just fine but when it iterates for a second time it gives me a JSONDecodeError:
JSONDecodeError: Expecting value: line 2 column 1 (char 1)
My JSON file is 650Mb is size approximately.
To get the twitter data I used the StreamListener from the Twitter API.
Here is a glimpse into my JSON file:
{"created_at":"Sun Apr 24 05:37:02 +0000 2016","id":724109877732204544,"id_str":"724109877732204544","text":"JONES RETURNS WITH A UNANIMOUS DECISION WIN IVER OVINCE SAINT PREUX! #UFC197 https:\/\/t.co\/KlfaAh9h21","source":"\u003ca href=\"http:\/\/instagram.com\" rel=\"nofollow\"\u003eInstagram\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":714389668633116672,"id_str":"714389668633116672","name":"Leon Doyle","screen_name":"TheLDPodcast","location":"Dublin, Ireland","url":"http:\/\/www.youtube.com","description":"A weekly\/bi-weekly podcast focused mainly around MMA, Boxing, fighting etc. With the occasional random topic.","protected":false,"verified":false,"followers_count":7,"friends_count":59,"listed_count":0,"favourites_count":3,"statuses_count":31,"created_at":"Mon Mar 28 09:52:24 +0000 2016","utc_offset":null,"time_zone":null,"geo_enabled":false,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"000000","profile_background_image_url":"http:\/\/abs.twimg.com\/images\/themes\/theme1\/bg.png","profile_background_image_url_https":"https:\/\/abs.twimg.com\/images\/themes\/theme1\/bg.png","profile_background_tile":false,"profile_link_color":"004455","profile_sidebar_border_color":"000000","profile_sidebar_fill_color":"000000","profile_text_color":"000000","profile_use_background_image":false,"profile_image_url":"http:\/\/pbs.twimg.com\/profile_images\/714390864030797824\/REXXKCvs_normal.jpg","profile_image_url_https":"https:\/\/pbs.twimg.com\/profile_images\/714390864030797824\/REXXKCvs_normal.jpg","default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":null,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"is_quote_status":false,"retweet_count":0,"favorite_count":0,"entities":{"hashtags":[{"text":"UFC197","indices":[69,76]}],"urls":[{"url":"https:\/\/t.co\/KlfaAh9h21","expanded_url":"https:\/\/www.instagram.com\/p\/BEkk6Gewpqy\/","display_url":"instagram.com\/p\/BEkk6Gewpqy\/","indices":[77,100]}],"user_mentions":[],"symbols":[]},"favorited":false,"retweeted":false,"possibly_sensitive":false,"filter_level":"low","lang":"en","timestamp_ms":"1461476222819"}
{"created_at":"Sun Apr 24 05:37:03 +0000 2016","id":724109879200366592,"id_str":"724109879200366592","text":"regrann from #ufc - #AndStill UFC flyweight champ #MightyMouseUFC! #UFC197\n\nPresented by\u2026 https:\/\/t.co\/zbE5CsFxMJ","source":"\u003ca href=\"http:\/\/instagram.com\" rel=\"nofollow\"\u003eInstagram\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":1070221260,"id_str":"1070221260","name":"Will Manuel","screen_name":"TheWillManuel","location":"Kenai, AK","url":null,"description":"Alaskan. Paramedic. Firefighter. Industrial Security. Libertarian. 2nd Amendment. Liberty. BJJ & Muay Thai novice. #TeamRed #RedemptionMMA #BJJ #MuayThai #MMA","protected":false,"verified":false,"followers_count":437,"friends_count":573,"listed_count":32,"favourites_count":2516,"statuses_count":3184,"created_at":"Tue Jan 08 07:22:47 +0000 2013","utc_offset":-28800,"time_zone":"Alaska","geo_enabled":false,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"C0DEED","profile_background_image_url":"http:\/\/pbs.twimg.com\/profile_background_images\/579042288040435713\/VeA-zI45.jpeg","profile_background_image_url_https":"https:\/\/pbs.twimg.com\/profile_background_images\/579042288040435713\/VeA-zI45.jpeg","profile_background_tile":true,"profile_link_color":"4A913C","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":true,"profile_image_url":"http:\/\/pbs.twimg.com\/profile_images\/715188796615237632\/JvxeLz8D_normal.jpg","profile_image_url_https":"https:\/\/pbs.twimg.com\/profile_images\/715188796615237632\/JvxeLz8D_normal.jpg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/1070221260\/1447179132","default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":null,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"is_quote_status":false,"retweet_count":0,"favorite_count":0,"entities":{"hashtags":[{"text":"AndStill","indices":[22,31]},{"text":"UFC197","indices":[69,76]}],"urls":[{"url":"https:\/\/t.co\/zbE5CsFxMJ","expanded_url":"https:\/\/www.instagram.com\/p\/BEkk6a0QMeX\/","display_url":"instagram.com\/p\/BEkk6a0QMeX\/","indices":[92,115]}],"user_mentions":[{"screen_name":"ufc","name":"#UFC197","id":6446742,"id_str":"6446742","indices":[13,17]},{"screen_name":"MightyMouseUFC","name":"Demetrious Johnson","id":140845817,"id_str":"140845817","indices":[52,67]}],"symbols":[]},"favorited":false,"retweeted":false,"possibly_sensitive":false,"filter_level":"low","lang":"en","timestamp_ms":"1461476223169"}
{"created_at":"Sun Apr 24 05:37:03 +0000 2016","id":724109882341896192,"id_str":"724109882341896192","text":"RT #BESTFlGHTS: Jon Jones flips off Daniel Cormier at #UFC197 https:\/\/t.co\/S0pDvRWhfW","source":"\u003ca href=\"http:\/\/twitter.com\/download\/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":1019191860,"id_str":"1019191860","name":"Paul","screen_name":"Paulie_Frat","location":"Mount Pocono, PA","url":null,"description":"...","protected":false,"verified":false,"followers_count":272,"friends_count":259,"listed_count":0,"favourites_count":1580,"statuses_count":1622,"created_at":"Tue Dec 18 07:10:12 +0000 2012","utc_offset":-14400,"time_zone":"Eastern Time (US & Canada)","geo_enabled":true,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"131516","profile_background_image_url":"http:\/\/abs.twimg.com\/images\/themes\/theme14\/bg.gif","profile_background_image_url_https":"https:\/\/abs.twimg.com\/images\/themes\/theme14\/bg.gif","profile_background_tile":true,"profile_link_color":"009999","profile_sidebar_border_color":"EEEEEE","profile_sidebar_fill_color":"EFEFEF","profile_text_color":"333333","profile_use_background_image":true,"profile_image_url":"http:\/\/pbs.twimg.com\/profile_images\/512140999444164608\/4H2fiOtg_normal.jpeg","profile_image_url_https":"https:\/\/pbs.twimg.com\/profile_images\/512140999444164608\/4H2fiOtg_normal.jpeg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/1019191860\/1461422809","default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":null,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweeted_status":{"created_at":"Sun Apr 24 05:12:13 +0000 2016","id":724103630702432256,"id_str":"724103630702432256","text":"Jon Jones flips off Daniel Cormier at #UFC197 https:\/\/t.co\/S0pDvRWhfW","source":"\u003ca href=\"http:\/\/bufferapp.com\" rel=\"nofollow\"\u003eBuffer\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":1370712786,"id_str":"1370712786","name":"BEST FIGHTS","screen_name":"BESTFlGHTS","location":"MMA, Boxing, Street Fights","url":"http:\/\/snapchat.com\/add\/wshhfans","description":"Parody, we do not own the content posted DM's are open send me your fight","protected":false,"verified":false,"followers_count":156257,"friends_count":17861,"listed_count":83,"favourites_count":1,"statuses_count":6723,"created_at":"Sun Apr 21 22:43:19 +0000 2013","utc_offset":-25200,"time_zone":"Arizona","geo_enabled":false,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"131516","profile_background_image_url":"http:\/\/abs.twimg.com\/images\/themes\/theme14\/bg.gif","profile_background_image_url_https":"https:\/\/abs.twimg.com\/images\/themes\/theme14\/bg.gif","profile_background_tile":true,"profile_link_color":"ABB8C2","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"EFEFEF","profile_text_color":"333333","profile_use_background_image":true,"profile_image_url":"http:\/\/pbs.twimg.com\/profile_images\/620356388833734657\/NvmkmGDk_normal.jpg","profile_image_url_https":"https:\/\/pbs.twimg.com\/profile_images\/620356388833734657\/NvmkmGDk_normal.jpg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/1370712786\/1460756748","default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":null,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"is_quote_status":false,"retweet_count":740,"favorite_count":624,"entities":{"hashtags":[{"text":"UFC197","indices":[38,45]}],"urls":[{"url":"https:\/\/t.co\/S0pDvRWhfW","expanded_url":"http:\/\/vine.co\/v\/iU5T53X6U7J","display_url":"vine.co\/v\/iU5T53X6U7J","indices":[46,69]}],"user_mentions":[],"symbols":[]},"favorited":false,"retweeted":false,"possibly_sensitive":false,"filter_level":"low","lang":"en"},"is_quote_status":false,"retweet_count":0,"favorite_count":0,"entities":{"hashtags":[{"text":"UFC197","indices":[54,61]}],"urls":[{"url":"https:\/\/t.co\/S0pDvRWhfW","expanded_url":"http:\/\/vine.co\/v\/iU5T53X6U7J","display_url":"vine.co\/v\/iU5T53X6U7J","indices":[62,85]}],"user_mentions":[{"screen_name":"BESTFlGHTS","name":"BEST FIGHTS","id":1370712786,"id_str":"1370712786","indices":[3,14]}],"symbols":[]},"favorited":false,"retweeted":false,"possibly_sensitive":false,"filter_level":"low","lang":"en","timestamp_ms":"1461476223918"}
How can I solve this issue?
If your JSON file has exactly the same structure as the piece you are posting, the empty lines between tweets indeed cause a JSONDecodeError. If that's the problem, just check that the line is not empty before processing:
In [12]:
with open(fname, 'r') as f:
for line in f:
if (not line.strip()):
continue
tweet = json.loads(line)['text']
print(tweet)
Hope it helps.
I have a text file in JSON format that I downloaded using code from this link. It looks something like this:
"{\"contributors\":null,\"coordinates\":null,\"in_reply_to_user_id\":null,\"truncated\":false,\"text\":\"'ello miss...?\",\"entities\":{\"hashtags\":[],\"urls\":[],\"user_mentions\":[]},\"place\":null,\"id_str\":\"234702954853199872\",\"favorited\":false,\"geo\":null,\"source\":\"\u003Ca href=\\"http:\/\/www.tweetdeck.com\\" rel=\\"nofollow\\"\u003ETweetDeck\u003C\/a\u003E\",\"retweet_count\":0,\"in_reply_to_status_id_str\":null,\"in_reply_to_screen_name\":null,\"created_at\":\"Sun Aug 12 17:28:39 +0000 2012\",\"in_reply_to_user_id_str\":null,\"user\":{\"show_all_inline_media\":false,\"lang\":\"en\",\"friends_count\":145,\"profile_sidebar_border_color\":\"181A1E\",\"location\":\"Chile\",\"profile_background_image_url_https\":\"https:\/\/si0.twimg.com\/images\/themes\/theme9\/bg.gif\",\"id_str\":\"76862348\",\"listed_count\":5,\"profile_use_background_image\":true,\"profile_image_url_https\":\"https:\/\/si0.twimg.com\/profile_images\/1547896482\/egotuiter_normal.png\",\"description\":\"Geek. Amante de la m\u00fasica. Ateo. Nortino. Estudio Derecho en la U. de Chile. Nadie lee mi blog. Cobreloino. Afortunadamente ya no uso lentes :D\",\"follow_request_sent\":null,\"following\":null,\"profile_text_color\":\"666666\",\"default_profile\":false,\"profile_background_image_url\":\"http:\/\/a0.twimg.com\/images\/themes\/theme9\/bg.gif\",\"followers_count\":181,\"is_translator\":false,\"time_zone\":\"Buenos Aires\",\"profile_link_color\":\"2FC2EF\",\"protected\":false,\"created_at\":\"Thu Sep 24 05:11:20 +0000 2009\",\"profile_background_color\":\"1A1B1F\",\"name\":\"Camilo Rojas\",\"default_profile_image\":false,\"contributors_enabled\":false,\"statuses_count\":36450,\"geo_enabled\":false,\"notifications\":null,\"profile_background_tile\":false,\"url\":\"http:\/\/unnombreingenioso.blogspot.com\",\"profile_image_url\":\"http:\/\/a0.twimg.com\/profile_images\/1547896482\/egotuiter_normal.png\",\"screen_name\":\"rojas_altazor\",\"id\":76862348,\"verified\":false,\"utc_offset\":-10800,\"favourites_count\":42,\"profile_sidebar_fill_color\":\"252429\"},\"retweeted\":false,\"in_reply_to_status_id\":null,\"id\":234702954853199872}
"
"{\"contributors\":null,\"coordinates\":null,\"in_reply_to_user_id\":null,\"truncated\":false,\"text\":\"VALENTINA CORTANTE!\",\"entities\":{\"hashtags\":[],\"urls\":[],\"user_mentions\":[]},\"place\":null,\"id_str\":\"234702954861580288\",\"favorited\":false,\"geo\":null,\"source\":\"web\",\"retweet_count\":0,\"in_reply_to_status_id_str\":null,\"in_reply_to_screen_name\":null,\"created_at\":\"Sun Aug 12 17:28:39 +0000 2012\",\"in_reply_to_user_id_str\":null,\"user\":{\"show_all_inline_media\":false,\"lang\":\"es\",\"friends_count\":251,\"profile_sidebar_border_color\":\"CC3366\",\"location\":\"\",\"profile_background_image_url_https\":\"https:\/\/si0.twimg.com\/images\/themes\/theme11\/bg.gif\",\"id_str\":\"292675295\",\"listed_count\":0,\"profile_use_background_image\":true,\"profile_image_url_https\":\"https:\/\/si0.twimg.com\/profile_images\/2494400748\/7zd2z67iclw88rc0q8sr_normal.jpeg\",\"description\":\"Soy hermosaaaa y valen me ama\u2665\",\"follow_request_sent\":null,\"following\":null,\"profile_text_color\":\"362720\",\"default_profile\":false,\"profile_background_image_url\":\"http:\/\/a0.twimg.com\/images\/themes\/theme11\/bg.gif\",\"followers_count\":399,\"is_translator\":false,\"time_zone\":\"Santiago\",\"profile_link_color\":\"B40B43\",\"protected\":false,\"created_at\":\"Wed May 04 01:35:06 +0000 2011\",\"profile_background_color\":\"FF6699\",\"name\":\"Valen me amodora\u2020\",\"default_profile_image\":false,\"contributors_enabled\":false,\"statuses_count\":2643,\"geo_enabled\":false,\"notifications\":null,\"profile_background_tile\":true,\"url\":null,\"profile_image_url\":\"http:\/\/a0.twimg.com\/profile_images\/2494400748\/7zd2z67iclw88rc0q8sr_normal.jpeg\",\"screen_name\":\"CamiCelie\",\"id\":292675295,\"verified\":false,\"utc_offset\":-14400,\"favourites_count\":2,\"profile_sidebar_fill_color\":\"E5507E\"},\"retweeted\":false,\"in_reply_to_status_id\":null,\"id\":234702954861580288}
"
I'm curious how to extract individual pieces to an R data frame. For instance this would ideally go to a data frame like this:
screen_name text
rojas_altazor 'ello miss...?
CamiCelie VALENTINA CORTANTE!
... ...
This is my first foray into using JSON files so any suggestions would be appreciated.
First, using the rjson library, we pull in the stream - in this case, I'm using one user's timeline.
library(rjson)
timeline=fromJSON(file="http://api.twitter.com/1/statuses/user_timeline.json?screen_name=douglbutt&count=100")
This gives us a list - I always have trouble breaking hierarchical lists down into neat tables, so I'm going to do it field by field.
timelist=unlist(timeline)
tweets=timelist[names(timelist)=="text"]
names=timelist[names(timelist)=="user.screen_name"]
times=timelist[names(timelist)=="created_at"]
tweet.frame=data.frame(tweets,names,times)
So we should have them all in tweet.frame. If you want to look at the available fields in unlisted data, try:
unique(names(timelist))
twit<-c("{\"contributors\":null,\"coordinates\":null,\"in_reply_to_user_id\":null,\"truncated\":false,\"text\":\"'ello miss...?\",\"entities\":{\"hashtags\":[],\"urls\":[],\"user_mentions\":[]},\"place\":null,\"id_str\":\"234702954853199872\",\"favorited\":false,\"geo\":null,\"source\":\"\\u003Ca href=\\\"http:\\/\\/www.tweetdeck.com\\\" rel=\\\"nofollow\\\"\\u003ETweetDeck\\u003C\\/a\\u003E\",\"retweet_count\":0,\"in_reply_to_status_id_str\":null,\"in_reply_to_screen_name\":null,\"created_at\":\"Sun Aug 12 17:28:39 +0000 2012\",\"in_reply_to_user_id_str\":null,\"user\":{\"show_all_inline_media\":false,\"lang\":\"en\",\"friends_count\":145,\"profile_sidebar_border_color\":\"181A1E\",\"location\":\"Chile\",\"profile_background_image_url_https\":\"https:\\/\\/si0.twimg.com\\/images\\/themes\\/theme9\\/bg.gif\",\"id_str\":\"76862348\",\"listed_count\":5,\"profile_use_background_image\":true,\"profile_image_url_https\":\"https:\\/\\/si0.twimg.com\\/profile_images\\/1547896482\\/egotuiter_normal.png\",\"description\":\"Geek. Amante de la m\\u00fasica. Ateo. Nortino. Estudio Derecho en la U. de Chile. Nadie lee mi blog. Cobreloino. Afortunadamente ya no uso lentes :D\",\"follow_request_sent\":null,\"following\":null,\"profile_text_color\":\"666666\",\"default_profile\":false,\"profile_background_image_url\":\"http:\\/\\/a0.twimg.com\\/images\\/themes\\/theme9\\/bg.gif\",\"followers_count\":181,\"is_translator\":false,\"time_zone\":\"Buenos Aires\",\"profile_link_color\":\"2FC2EF\",\"protected\":false,\"created_at\":\"Thu Sep 24 05:11:20 +0000 2009\",\"profile_background_color\":\"1A1B1F\",\"name\":\"Camilo Rojas\",\"default_profile_image\":false,\"contributors_enabled\":false,\"statuses_count\":36450,\"geo_enabled\":false,\"notifications\":null,\"profile_background_tile\":false,\"url\":\"http:\\/\\/unnombreingenioso.blogspot.com\",\"profile_image_url\":\"http:\\/\\/a0.twimg.com\\/profile_images\\/1547896482\\/egotuiter_normal.png\",\"screen_name\":\"rojas_altazor\",\"id\":76862348,\"verified\":false,\"utc_offset\":-10800,\"favourites_count\":42,\"profile_sidebar_fill_color\":\"252429\"},\"retweeted\":false,\"in_reply_to_status_id\":null,\"id\":234702954853199872}",
"", "{\"contributors\":null,\"coordinates\":null,\"in_reply_to_user_id\":null,\"truncated\":false,\"text\":\"VALENTINA CORTANTE!\",\"entities\":{\"hashtags\":[],\"urls\":[],\"user_mentions\":[]},\"place\":null,\"id_str\":\"234702954861580288\",\"favorited\":false,\"geo\":null,\"source\":\"web\",\"retweet_count\":0,\"in_reply_to_status_id_str\":null,\"in_reply_to_screen_name\":null,\"created_at\":\"Sun Aug 12 17:28:39 +0000 2012\",\"in_reply_to_user_id_str\":null,\"user\":{\"show_all_inline_media\":false,\"lang\":\"es\",\"friends_count\":251,\"profile_sidebar_border_color\":\"CC3366\",\"location\":\"\",\"profile_background_image_url_https\":\"https:\\/\\/si0.twimg.com\\/images\\/themes\\/theme11\\/bg.gif\",\"id_str\":\"292675295\",\"listed_count\":0,\"profile_use_background_image\":true,\"profile_image_url_https\":\"https:\\/\\/si0.twimg.com\\/profile_images\\/2494400748\\/7zd2z67iclw88rc0q8sr_normal.jpeg\",\"description\":\"Soy hermosaaaa y valen me ama\\u2665\",\"follow_request_sent\":null,\"following\":null,\"profile_text_color\":\"362720\",\"default_profile\":false,\"profile_background_image_url\":\"http:\\/\\/a0.twimg.com\\/images\\/themes\\/theme11\\/bg.gif\",\"followers_count\":399,\"is_translator\":false,\"time_zone\":\"Santiago\",\"profile_link_color\":\"B40B43\",\"protected\":false,\"created_at\":\"Wed May 04 01:35:06 +0000 2011\",\"profile_background_color\":\"FF6699\",\"name\":\"Valen me amodora\\u2020\",\"default_profile_image\":false,\"contributors_enabled\":false,\"statuses_count\":2643,\"geo_enabled\":false,\"notifications\":null,\"profile_background_tile\":true,\"url\":null,\"profile_image_url\":\"http:\\/\\/a0.twimg.com\\/profile_images\\/2494400748\\/7zd2z67iclw88rc0q8sr_normal.jpeg\",\"screen_name\":\"CamiCelie\",\"id\":292675295,\"verified\":false,\"utc_offset\":-14400,\"favourites_count\":2,\"profile_sidebar_fill_color\":\"E5507E\"},\"retweeted\":false,\"in_reply_to_status_id\":null,\"id\":234702954861580288}",
"")
library(RJSONIO)
twit1<-fromJSON(twit[1])
> twit1$user$screen_name
[1] "rojas_altazor"
> twit1$text
[1] "'ello miss...?"
> twit2<-fromJSON(twit[3])
> twit2$user$screen_name
[1] "CamiCelie"
> twit2$text
[1] "VALENTINA CORTANTE!"