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