Python: parse JSON files

preview_player
Показать описание
Python: parse JSON files

In this tutorial, we will be learning how to read JSON files and parse them into arrays and dictionaries.
Рекомендации по теме
Комментарии
Автор

I like how the examples build on each other!

toex
Автор

can you do a real world json file with thousands open data like pokemon or any open api? i have difficulties with understanding json file

bwyzrxq
Автор

Great content.
I have one real time scenario, since many days trying to resolve but no luck. could you please help me on Python code if possible can you make video


1. source excel book(sheet name is EMP) contain three column ColA, ColB, ColC
2. above excel attribute information (attribute start position, data type, length, scale, precision) coming through Json file(attaching below)


Normally every excel header start from A1 cell and data start from A2 cell but here Header start from B3 cell and data start from B4 cell.

Using read_excel i am able to read excel file but getting null value as Header start from B3. So Based on Json file (header start position, row start position) how to read excel file dynamically. and also need to convert data precision given in json file

Json
{
"templet_master":[
{
"templet_id":1475,
"templet_name":"emp",
"file_loc":"C:\Users\srinu\Desktop\emp.xls",
"file_type":"XLS",
"template_section":[
{
"section_name":"emp",
"skip_rows":0
"header_strt_position":"B3",
"row_strt_position":"B4",
"data_orienttion":"ROW",
"Abstraction_col_name":"sheetname",
"template_attr":[
{
"attri_name":"colA",
"len":8
"dateType":"DATE",
"date_formt":"mmm-yyyy",
},
{
"attri_name":"colb",
"len":100
"dateType":"string",

},
{
"attri_name":"colc",
"len":8
"dateType":"DECIMAL",
"precision":5
}

]
}

]
}
]
}

kottakaburlu
Автор

any idea how to do it with a large string Json file?

capincrunch
Автор

Can you share those json files in the discription so that we can follow you?

serchava