python-ox/ox/jsonc.py

16 lines
254 B
Python
Raw Normal View History

2011-10-12 10:19:57 +00:00
#!/usr/bin/python
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
from __future__ import with_statement
from js import minify
from utils import json
2011-10-12 10:26:26 +00:00
def load(f):
return loads(f.read())
2011-10-12 10:19:57 +00:00
def loads(source):
return json.loads(minify(source))