diff options
Diffstat (limited to 'jq.pyx')
| -rw-r--r-- | jq.pyx | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -1,3 +1,4 @@ +import io import json import threading @@ -255,6 +256,13 @@ cdef class _Program(object): def input_value(self, value): return self.input_text(json.dumps(value)) + def input_values(self, values): + fileobj = io.StringIO() + for value in values: + json.dump(value, fileobj) + fileobj.write("\n") + return self.input_text(fileobj.getvalue()) + def input_text(self, text): return _ProgramWithInput(self._jq_state_pool, text.encode("utf8")) |
