FB7L2QQW6L7X4OWANGKN5U4XFLTJ7G3OINZBQEG3ZT53FUIGKAYAC
IHVD5VZIQU72CGEGWTFVTI6K2VVZYJHUIBW3GLSCDOFFQGZVLV5QC
CIOTARCZGYB3CVH6RMR2IGJ7UBKJAFOACPMCIGMHEXRCL63CKR6AC
OTIBCAUJ3KDQJLVDN3A536DLZGNRYMGJLORZVR3WLCGXGO6UGO6AC
IOYWCTDEHO4GHC777JYUODJSSHL2SJWYTUG5PQPZOG5HEVR6XXYQC
VHQCNMARPMNBSIUFLJG7HVK4QGDNPCGNVFLHS3I4IGNVSV5MRLYQC
GQBUV2XOMEPMTXMPCBQWGGIUXGQDX77VTGPFIG6YT7G64ASOYHXQC
end
end
function emit_links_in_json_in_consistent_order(outfile, links)
--? outfile:write(json.encode(Cache[id].links))
local first_written = false
outfile:write('{')
for _,label in pairs(Edge_list) do
if links[label] then
if first_written then
outfile:write(',')
else
first_written = true
end
outfile:write('"')
outfile:write(label)
outfile:write('":"')
outfile:write(links[label])
outfile:write('"')
end
end
-- links we don't know about, just in case
for rel,target in pairs(links) do
if Opposite[rel] == nil then
if first_written then
outfile:write(',')
else
first_written = true
end
outfile:write('"')
outfile:write(rel)
outfile:write('":"')
outfile:write(target)
outfile:write('"')
end