summaryrefslogtreecommitdiff
path: root/bindings/python/jsonparser.pyx
diff options
context:
space:
mode:
authorYangfl <mmyangfl@gmail.com>2018-09-18 21:55:40 +0800
committergit-ubuntu importer <ubuntu-devel-discuss@lists.ubuntu.com>2018-11-22 16:37:32 +0000
commit33b1dd8201483eb3a630877b40c4c0109fb0d0e0 (patch)
treec62462b7731fc7376616bcdf52bddca3a87f1460 /bindings/python/jsonparser.pyx
Imported using git-ubuntu import.
Notes
Notes:
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