summaryrefslogtreecommitdiffstats
path: root/funcweb/funcweb/json.py
diff options
context:
space:
mode:
Diffstat (limited to 'funcweb/funcweb/json.py')
-rw-r--r--funcweb/funcweb/json.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/funcweb/funcweb/json.py b/funcweb/funcweb/json.py
new file mode 100644
index 0000000..66d5cfb
--- /dev/null
+++ b/funcweb/funcweb/json.py
@@ -0,0 +1,10 @@
+# A JSON-based API(view) for your app.
+# Most rules would look like:
+# @jsonify.when("isinstance(obj, YourClass)")
+# def jsonify_yourclass(obj):
+# return [obj.val1, obj.val2]
+# @jsonify can convert your objects to following types:
+# lists, dicts, numbers and strings
+
+from turbojson.jsonify import jsonify
+