summaryrefslogtreecommitdiff
path: root/README.rst
diff options
context:
space:
mode:
Diffstat (limited to 'README.rst')
-rw-r--r--README.rst10
1 files changed, 8 insertions, 2 deletions
diff --git a/README.rst b/README.rst
index 8bb8e76..6e78368 100644
--- a/README.rst
+++ b/README.rst
@@ -8,14 +8,20 @@ Installation requires Git and any programs required to build jq, such as gcc.
During installation,
jq 1.4 is cloned from GitHub and built.
-Examples
---------
+Usage
+-----
+
+A program can be compiled by passing it to ``jq.jq``.
+To apply the program to an input, called the ``transform`` method.
+jq.py expects the value to be valid JSON,
+such as values returned from ``json.load``.
.. code-block:: python
from jq import jq
jq(".").transform("42") == "42"
+ jq(".").transform({"a": 1}) == {"a": 1}
If the value is unparsed JSON text, pass it in using the ``text``
argument: