summaryrefslogtreecommitdiff
path: root/bindings/python/jsonparser.pyx
diff options
context:
space:
mode:
Diffstat (limited to 'bindings/python/jsonparser.pyx')
-rw-r--r--bindings/python/jsonparser.pyx9
1 files changed, 9 insertions, 0 deletions
diff --git a/bindings/python/jsonparser.pyx b/bindings/python/jsonparser.pyx
new file mode 100644
index 0000000..49a7e08
--- /dev/null
+++ b/bindings/python/jsonparser.pyx
@@ -0,0 +1,9 @@
+cdef extern from "wrap_json.c":
+ object decode_json(char * value)
+ object get_exception_class()
+
+JSONException = get_exception_class()
+
+def decode(value):
+ value = value.encode('utf-8')
+ return decode_json(value) \ No newline at end of file