tweecode/twine — pull request #166 by Lokno (2014-08-31 14:23:21+00:00)
Title: Added JSON Save and Load

I thought it would be useful for Twine to be able to save and load JSON instead of pickle dumps. I wrote some changes to use the jsonpickle library to instead of pickle. I also stringified dates (time.struct_time) to aid human readability of the result. This required some changes to the Tiddler (tiddlywiki.py) class __getstate__ and a new __setstate__ override. Saving as JSON is a special drop down option, but loading is transparent.

Mostly looking for feedback. Main drawback at the moment is that, while it can read old .tws files, it adds a "timeEncoded" field so that older Twine builds won't be able to load it.