Mercurial > hg > decoupage
view decoupage/formats.py @ 52:a2f09d749a3f
work towards refactor letting links (and maybe other things in the future) dwell in a decoupage namespace
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Tue, 16 Nov 2010 21:14:25 -0800 |
parents | ac693b8df32c |
children | 47acf12d01e1 |
line wrap: on
line source
try: import json as json except ImportError: import simplejson as json def format_json(data): # fix datetime for f in data['files']: if 'modified' in f: f['modified'] = f['modified'].ctime() return 'application/json', json.dumps(data['files'])