--- /dev/null
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+# -*- coding: utf-8 -*-
+#
+
+__version__ = '1.1'
+
+import sys
+import os
+import re
+
+
+class JsonExporter(object):
+
+ def __init__(self, util, linkpairs):
+ self._u = util
+ self._linkpairs = linkpairs
+
+ def export(self):
+ json_strings = ""
+ for linkpair in self._linkpairs:
+ json_strings = json_strings + linkpair.to_json() + "\n"
+ json_strings = json_strings.rstrip(",")
+ return json_strings
+
+# try:
+# json_file = open(db_name, 'w')
+# json_file.write("{\"linkpairs\": [")
+# json_file.write(json_strings)
+# json_file.write("]\n}")
+# json_file.close()
+# except:
+# print "error:", sys.exc_info()[0]
+# raise