我想稍微操作一下我的 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 书签格式有规范吗?我找不到一个。