summaryrefslogtreecommitdiff
path: root/jq.pyx
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2013-06-19 10:41:28 +0100
committerMichael Williamson <mike@zwobble.org>2013-06-19 10:41:28 +0100
commit20a73a5f293492b9490f4fec3a060cc173c879f8 (patch)
treefa66893a0db7e2d17a46856b72b77fe5cab39995 /jq.pyx
parentdffec2542092df6f207300d5aaca49fcfe7be486 (diff)
Add transform_json method
Diffstat (limited to 'jq.pyx')
-rw-r--r--jq.pyx3
1 files changed, 3 insertions, 0 deletions
diff --git a/jq.pyx b/jq.pyx
index 1e1670a..6c4ea4c 100644
--- a/jq.pyx
+++ b/jq.pyx
@@ -41,6 +41,9 @@ class _Program(object):
def transform_string(self, input):
return _Result(_string_to_strings(self._program, input))
+
+ def transform_json(self, input):
+ return _Result(_string_to_strings(self._program, json.dumps(input)))
class _Result(object):