summaryrefslogtreecommitdiffstats
path: root/ipa-server/ipa-gui/ipagui/json.py
diff options
context:
space:
mode:
Diffstat (limited to 'ipa-server/ipa-gui/ipagui/json.py')
-rw-r--r--ipa-server/ipa-gui/ipagui/json.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/ipa-server/ipa-gui/ipagui/json.py b/ipa-server/ipa-gui/ipagui/json.py
new file mode 100644
index 000000000..66d5cfb65
--- /dev/null
+++ b/ipa-server/ipa-gui/ipagui/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
+