summaryrefslogtreecommitdiff
path: root/README.rst
diff options
context:
space:
mode:
Diffstat (limited to 'README.rst')
-rw-r--r--README.rst9
1 files changed, 9 insertions, 0 deletions
diff --git a/README.rst b/README.rst
index aa8cf49..15b7087 100644
--- a/README.rst
+++ b/README.rst
@@ -99,6 +99,15 @@ Call ``.input_text()`` to supply unparsed JSON text:
assert jq.compile(".").input_text("0.42").first() == 0.42
assert jq.compile(".").input_text("true").first() == True
assert jq.compile(".").input_text('"hello"').first() == "hello"
+ assert jq.compile(".").input_text("1\n2\n3").all() == [1, 2, 3]
+
+Pass ``slurp=True`` to ``.input_text()`` to read the entire input into an array:
+
+.. code-block:: python
+
+ import jq
+
+ assert jq.compile(".").input_text("1\n2\n3", slurp=True).first() == [1, 2, 3]
You can also call the older ``input()`` method by passing: