您好我熟悉python xmltree,json,pandas和numpy,XML解析。今天我有一个巨大的文本文件来解析它几乎看起来像json格式有点不同,我明白如果我可以创建字典像json我的问题解决了,但我完全无能如何转换为json,下面的文件
%Bank PARSED MESSAGE FILE
%VERSION : PIL 98.7
%nex MODULE : SIL 98
2018 Jan 31 16:44:53.050
Pkt Version = 8
name id ID = 0, ID = 58
Freq = 180
conserved NEXT:
value Name ::=
{
message c1 : ABC1 :
{
XYZ2
{
Andhra
{
{
Vizag
{
pool
{
1,
2,
3
},
loop
{
6,
7,
5
}
},
toll closed //
}
},
toll code '00000000 00000001'B
2018 Jan 31 16:44:43.050
Pkt Version = 8
name id ID = 1, ID = 56
Freq = 567
conserved LATE:
World ::=
{
Asia c1 : EastAsia :
{
India
{
Tamil
{
{
Trichy
{
pool
{
1,
2,
3
},
loop
{
6,
7,
5
}
},
toll closed //
}
},
toll code '00000000 00000001'B