I have 40+ .json files that need to be merged and combined to import into Firefox...HOW???
I want to import my 40+ .json files into firefox, have them combined as a single bookmark source, and, no, I don't want duplicates if possible. Each one of these files has about 1000 bookmarks in it; categorized in folders and organized. There are many duplicates. There are hundreds of folders organizing the bookmarks in each file. Editing this by hand is not an option. I am a purchasing agent with 1000's and 1000's of vendors for a hundred departments...you get the idea.
All Replies (10)
Import is for HTML files and Restore is for JSON bookmark files. Bookmark.html files will merge with existing bookmarks when imported into Firefox. JSON bookmarksbackup files will replace any existing bookmarks in Firefox when restored.
You will need to Export each of those sets of bookmarks that are in those 40+ JSON files to bookmarks.HTML format, and then import those HTML file into Firefox. Or find a JSON-to-HTML file converter program, and then import the resulting files into Firefox one-at-a-time.. OR ideally, find a program or the code to merge those JSON files.
Here's a few references that I gathered over the years: dead project - http://coderplay.blogspot.com/2006/12/json-2-html.html http://www.codeproject.com/Articles/405317/Merge-Firefox-json-bookmarks
Use with Extreme Caution;
Bookmark Duplicate Cleaner {web link}
Scans for bookmark duplicates and allows you to delete them
Bookmarks Checker - check for bad links {web link} Check favorites for broken or bad links. It checks for bad links and displays a report if it finds something. Check for 404 links, timeout links.
You would have to restore each of those JSON backups in Firefox and save (export) the bookmarks to an HTML file. You can create a second, separate, profile to do this, so you do not this in your current profile.
Then you can import each of the HTML backups in your current profile.
Thanks for all your help everyone!!
Would sync take care of this? Is there a way to set up sync to not delete bookmarks so I can just load each .json into it?
I don't write code, so I have no clue, but couldn't functionality be written into the browser so that multiple .json files could be loaded?
I always have wished firefox bookmark management was as good as the browser. :/
IMO, trying to modify Firefox to append bookmarks when restoring JSON backup files, rather than overwriting existing bookmarks (or create other problems), might take longer than writing a script to merge JSON files outside of Firefox. I don't know how long you looked / searched for a JSON merge script, but the two I found were quite old and user comments mentioned neither of those two worked in recent years. SQLITE bookmarks and JSON backups in Firefox have been around for over 8 years now and Mozilla has updated them a few times over the years.
Regarding using Sync ... IMO, too much "swapping out" of JSON files in a 2nd Profile. I wouldn't trust Sync to 'get it right' when trying to do that with 40+ JSON backup files, especially as far as how Sync would handle the "device name" with the 2nd Profile, repeatedly getting a different JSON file. About the only way I would feel safe proceeding, would be with 40+ separate new Profiles so Sync would see 40+ separate "devices"; and I'm not sure the Sync server could handle that many. A lot of work!
I think doing what cor-el mentioned about creating HTML files from each of those JSON files would be a better way to proceed. After the first JSON file is "restored" and exported in HTML format, clear the JSON backup that would have been created and delete the places.sqlite file. Open Firefox, a new places.sqlite file will be created when opening Firefox, and then "restore" another JSON file and "export in HTML format". Repeay until you have the 40+ HTML files.
As far as the bookmarks system not being 'good', I don't think I have used another browser that was a flexible in that regard as Firefox. Although I haven't used any other browsers as intensely as I have used Firefox, not as long or consistently; so I am not really in a position to compare or contrast Firefox with other web browsers. I just wonder how well Firefox will handle over 40,000 bookmarks in one Profile.
The structure of a JSON backup is that difficult with id's to link bookmarks and folders that I would only trust Firefox to handle such a JSON backup properly. If you are confident and adventurous then you can try to open 40 Firefox instances each with their own profile at the same time via the -no-remote command line switch and restore a JSON backup in each of these instances. Then you would only have to create the folders and you can transfer the bookmarks in each of the folders via the clipboard. This will only work if there are no sub folders present as they broke copying via the clipboard some Firefox versions ago. The Firefox 38 ESR version could be used to assemble a suitable places.sqlite as the clipboard still works properly in that version.
I appreciate all your answers, but I really need someone from Mozilla to tell me why this is so screwed up. A simple Google search shows that everyone hates this back up feature and Firefox management of it.
I should be able to Grab all the .json files in the manager and Firefox should import them all; put everything that is in the same titled folder into the same folder and manage duplicates. I don't think this is a ridiculous proposition to ask of the Mozilla team and you think one wouldn't still have to since this as been a problem for everyone since the beginning.
Converting to html is not an option as if you do that I end up with instance after instance of the same folder from old backups with slightly varying information in it. I can't see how importing as .html is ever a viable option when you will still have to manually sort them...WTF
I mean if the Firefox system was even as good as stock Windows File Manager it would be a VAST improvement.
And, NO, I do not want to use a web based system, nor should I have to at this day in age. Which is the only reason I'm not using a plugin for Chrome. I cannot have all the supply chain info for my company sitting conveniently online.
Please Mozilla there has to be a way to fix this.
A JSON backup works with IDs and other ways to link data structures like files and folders because a JSON backup is in essence a one to one snapshot of the current places.sqlite database. Each JSON backup has its own structure that is not guaranteed to be compatible with other JSON backups, so once you have restored one JSON backup then restoring another JSON backup won't be possible because of this. Only an HTML backup that consists solely of folder names and bookmarks can merge bookmarks.
Yea, I don't care how JSON backups work at all, because they apparently don't actually work as usable backups or archives that can be mended together.
And when one imports HTML files as backups all Firefox does is stack them. It doesn't organize like things into like folders it just duplicates it as many times as you copy it in and you have to manage it your self. (imagine if you will; windows file manager doing this as a total nightmare).
Of course the only real problem with managing it yourself is there is no actual built in functionality to do so. One can't even...say...highlight multiple folders to DELETE THEM.
Everything having to do with this is a FUNDAMENTAL flaw. There is no reason that firefox cannot look in a JSON file, or a group of them, see what's in there and copy in into corresponding folders and not copy in exact duplicates. Almost like if I copy a bunch of files from my USB drive into the root directory of a storage drive windows doesn't totally just screw it up. If there's a folder called Cake on my USB and a folder sitting in the directory of where I'm copying to called Cake; windows totally figures that out with some kind of black magic compared to firefox.
So does anyone from Mozilla actually have a Solution to the problem or are we just going to keep talking about ways the current system doesn't actually work?
I mean these questions are all over the forum and a simple google search will show many more talking about the same problem.
From what I can see, the JSON file was created for Firefox itself to use to fully restore your last set of bookmarks in the case that the places.sqlite database was too corrupted or was deleted. There are extra backups from earlier dates in case restoring the most recent file fails. This mechanism obviously was not designed for managing/merging multiple sets of bookmarks. Nothing anyone here can do will make it so.
itshouldbeazy said
So does anyone from Mozilla actually have a Solution to the problem or are we just going to keep talking about ways the current system doesn't actually work?
I believe you are already aware from previous posts of the various arduous ways to approach this issue, and there's nothing more to know about the built-in features.
To propose new features for Firefox, you can use the Input site:
https://input.mozilla.org/feedback/firefox
To solicit an add-on, you can use the Add-ons forum:
https://discourse.mozilla-community.org/c/add-ons
And until either of those comes to pass, you know what you need to do.