I added the following two chunks of code so that the mod could also dump the technologies table. (I hope the forum doesn't screw up the formatting too much.) Feel free to add this to your mod; don't worry about copyright or attribution, in my opinion my additions are too trivial to be copyrightable.
<pre>
technologies = function(filename)
local filename = filename;
if isNullOrEmpty(filename) then
filename = "technologies.json";
end
local technologies = game.forces[extractorForceName].technologies;
writeTechnologiesToJson(filename, technologies)
end
</pre>
function writeTechnologiesToJson(filename, technologiesUserdata)
technologiesTable = {};
for _, t in pairs(technologiesUserdata) do
local data = {};
data["name"] = t.name;
data["upgrade"] = t.upgrade;
data["ingredients"] = t.research_unit_ingredients;
data["count"] = t.research_unit_count;
data["energy"] = t.research_unit_energy;
data["effects"] = t.effects;
technologiesTable[t.name] = data;
end
game.write_file(filename, JSON:encode_pretty(technologiesTable));
end