|
假设有文本Bookmarks
现在需要从文本中提取“name”和“URL”中对应的内容,生成一个新的文本文件,格式如下:
建议网站 https://ieonline.microsoft.com/#ieslice
百度一下,你就知道 https://www.baidu.com/
该怎么做?原文本内容如下:
{
"checksum": "1c0adc5c6af848e800513f5a475d3a1e",
"roots": {
"bookmark_bar": {
"children": [ {
"date_added": "13093172866258463",
"id": "6",
"name": "建议网站",
"type": "url",
"url": "https://ieonline.microsoft.com/#ieslice"
}, {
"date_added": "13102131540804891",
"id": "7",
"name": "百度一下,你就知道",
"type": "url",
"url": "https://www.baidu.com/"
}, {
"date_added": "13102153780201735",
"id": "11",
"name": "搜狐",
"type": "url",
"url": "http://www.sohu.com/"
} ],
"date_added": "13102131354410490",
"date_modified": "13102154205871494",
"id": "1",
"name": "书签栏",
"type": "folder"
},
"other": {
"children": [ {
"date_added": "13102153748098092",
"id": "10",
"name": "新浪",
"type": "url",
"url": "http://www.sina.com/"
} ],
"date_added": "13102131354410498",
"date_modified": "13102153748098092",
"id": "2",
"name": "其他书签",
"type": "folder"
},
"synced": {
"children": [ ],
"date_added": "13102131354410499",
"date_modified": "0",
"id": "3",
"name": "移动设备书签",
"type": "folder"
}
},
"version": 1
} |
|