summaryrefslogtreecommitdiff
path: root/README.rst
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2014-06-13 16:33:46 +0100
committerMichael Williamson <mike@zwobble.org>2014-06-13 16:33:46 +0100
commit95a58530b122a94dc503ad51b736c24768197a81 (patch)
tree8d5c576e608eed7ac791795ef749e4adee780e0c /README.rst
parent9066024165b1f8eaa72e50ea2a7fa85f5021f5f3 (diff)
Rename "Examples" to "Usage" and make it a little clearer0.1.0
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: