diff options
author | Walter Bender <walter@sugarlabs.org> | 2013-11-22 15:14:08 (GMT) |
---|---|---|
committer | Walter Bender <walter@sugarlabs.org> | 2013-11-22 15:14:08 (GMT) |
commit | e464298f1bc5899da5822afb446ea6c0ec4d30e6 (patch) | |
tree | 46e66e75e7b08e9c9416fc3209301fc5b877da54 | |
parent | 92e9cc8bbd8900413c1349139e21ef12a411f684 (diff) |
elements has a depency on cjson
-rw-r--r-- | cjson.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/cjson.py b/cjson.py new file mode 100644 index 0000000..818d684 --- /dev/null +++ b/cjson.py @@ -0,0 +1,26 @@ +# Copyright (C) 2013 Sugar Labs + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +# elements.py has a dependency on cjson + +import json + + +def encode(arg): + return json.dumps(arg) + + +def decode(arg): + return json.loads(arg) |