我想稍微操纵我的Firefox书签.我已将它们导出到.json文件,并将它们读入我的程序.现在我想弄清楚文件.我创建了一个如下所示的书签:
随机字符串帮助我在JSON的大块中找到它们.书签对象如下所示:
{
"title":"49jy5M9NxD4xOQ13d5me",
"id":4080,
"parent":3,
"dateAdded":1384416939464000,
"lastModified":1384416982381000,
"annos":[
{
"name":"bookmarkProperties/description",
"flags":0,
"expires":4,
"value":"description"
}
],
"type":"text/x-moz-place",
"uri":"http://location/",
"keyword":"keyword1,keyword2,keyword3"
},
但那里的标签不存在……
如果我搜索标记字符串,我会在文件的完全不同的部分找到它,
{
"index":2,
"title":"Tags",
"id":4,
"parent":1,
"dateAdded":1359252968891000,
"lastModified":1384417276968000,
"type":"text/x-moz-place-container",
"root":"tagsFolder",
"children":[
{
"title":"mEszv3zTk1GHQYfTbsZZ",
"id":4081,
"parent":4,
"dateAdded":1384417272962000,
"lastModified":1384417272962000,
"type":"text/x-moz-place-container",
"children":[
{
"title":null,
"id":4082,
"parent":4081,
"dateAdded":1384417272962000,
"lastModified":1384417272962000,
"type":"text/x-moz-place",
"uri":"http://location/"
}
]
},
{
"index":1,
"title":"QWhcN2Bpl2BBUAtzdkif",
"id":4083,
"parent":4,
"dateAdded":1384417276968000,
"lastModified":1384417276969000,
"type":"text/x-moz-place-container",
"children":[
{
"title":null,
"id":4084,
"parent":4083,
"dateAdded":1384417276969000,
"lastModified":1384417276969000,
"type":"text/x-moz-place",
"uri":"http://location/"
}
]
}
]
},
但是没有可识别的链接回到书签.没有ID排队.那么关系是什么?
Firefox书签格式是否有规范?我找不到一个.
最佳答案 我经历了相同的过程,最后意识到uri是将标签链接到书签的内容.这就是为什么即使你有一个网站书签多次并只标记一次,标签将显示,但你访问该网站.