aboutsummaryrefslogtreecommitdiffstats
path: root/interfaces/web/Bugs-Everywhere-Web/beweb/json.py
diff options
context:
space:
mode:
authorChris Ball <cjb@laptop.org>2009-07-23 17:49:13 -0400
committerChris Ball <cjb@laptop.org>2009-07-23 17:49:13 -0400
commit6a639574fa95e50f82fa3052e5524b961295a7ab (patch)
treeb498654ed1dcbdbba94605292c280c883c5e9faa /interfaces/web/Bugs-Everywhere-Web/beweb/json.py
parent5e249abfee7273c79640c4211607a6b4bf7b374c (diff)
parentcaf0111d9c571ac268c235880e6d18fa512e9efa (diff)
downloadbugseverywhere-6a639574fa95e50f82fa3052e5524b961295a7ab.tar.gz
Merge large rework from W. Trevor King.
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
+