Serialize JSON object before writing to XML

This commit is contained in:
Simon Cozens 2020-09-10 13:22:33 +01:00
parent 87c65acd3a
commit 02c305c2fc

View File

@ -11,7 +11,7 @@ class table_D__e_b_g(DefaultTable.DefaultTable):
return json.dumps(self.data).encode("utf-8")
def toXML(self, writer, ttFont):
writer.writecdata(self.data)
writer.writecdata(json.dumps(self.data))
def fromXML(self, name, attrs, content, ttFont):
self.data = json.loads(content)