mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-06-28 19:20:40 +12:00
15 lines
307 B
Python
15 lines
307 B
Python
#!/usr/bin/env python
|
|
# --!-- coding: utf8 --!--
|
|
|
|
import json
|
|
from manuskript.io.textFile import TextFile
|
|
|
|
|
|
class JsonFile(TextFile):
|
|
|
|
def load(self):
|
|
return json.loads(TextFile.load(self))
|
|
|
|
def save(self, content):
|
|
TextFile.save(self, json.dumps(content, indent=4, sort_keys=True))
|