0
我想我的原始格式转换成JSON格式如何将此格式转换为perl中的JSON格式?
我原来的格式为:
RECORD
F recordType 18
F routingArea 04
F cellIdentifier 9E55
.
RECORD
F recordType 18
F routingArea 04
.
转换是这样的:
[ #openfile
{ #convert RECORD to [
"recordType" : "18", #cut prefix F and convert to json
"routingArea" : "04",
"cellIdentifier" : "9E55" #no comma before },
},
{
"recordType" : "18",
"routingArea" : "04"
} #no comma before ]
]
如何开发这样的脚本?
感谢,
http://search.cpan.org/perldoc?JSON – TLP 2012-03-08 04:51:50