aboutsummaryrefslogtreecommitdiffstats
path: root/interfaces/web/Bugs-Everywhere-Web/beweb/json.py
diff options
context:
space:
mode:
authorGianluca Montecchi <gian@grys.it>2009-10-01 23:39:28 +0200
committerGianluca Montecchi <gian@grys.it>2009-10-01 23:39:28 +0200
commited4a943875d81732bfa3127eb252c2db2e3588f4 (patch)
tree1fa7da00b01b8807adac3f3e3231fc8a78b3a6c7 /interfaces/web/Bugs-Everywhere-Web/beweb/json.py
parente42729af0efc1a4c064e8875e728f9c3c1694a1d (diff)
downloadbugseverywhere-ed4a943875d81732bfa3127eb252c2db2e3588f4.tar.gz
Merged with head branch
Diffstat (limited to 'interfaces/web/Bugs-Everywhere-Web/beweb/json.py')
-rw-r--r--interfaces/web/Bugs-Everywhere-Web/beweb/json.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/json.py b/interfaces/web/Bugs-Everywhere-Web/beweb/json.py
new file mode 100644
index 0000000..6e100c3
--- /dev/null
+++ b/interfaces/web/Bugs-Everywhere-Web/beweb/json.py
@@ -0,0 +1,13 @@
+# This module provides helper functions for the JSON part of your
+# view, if you are providing a JSON-based API for your app.
+
+# Here's what most rules would look like:
+# @jsonify.when("isinstance(obj, YourClass)")
+# def jsonify_yourclass(obj):
+# return [obj.val1, obj.val2]
+#
+# The goal is to break your objects down into simple values:
+# lists, dicts, numbers and strings
+
+from turbojson.jsonify import jsonify
+