Skip to content

Commit 7907fba

Browse files
akbakb
authored andcommitted
Jsonl
1 parent cccc77f commit 7907fba

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -341,16 +341,16 @@ Define new commands in your config file which provide aliases to other commands.
341341
[[alias.stage]]
342342
343343
command = "map"
344-
options = {code="json.loads ! types.SimpleNameSpace(**x)"}
344+
options = {code="json.loads"}
345345
346346
347347
Now we can use it like a regular command:
348348
349349
.. code-block:: bash
350350
351351
% mario jsonl <<< $'{"a":1, "b":2}\n{"a": 5, "b":9}'
352-
X(a=1, b=2)
353-
X(a=5, b=9)
352+
{'a': 1, 'b': 2}
353+
{'a': 5, 'b': 9}
354354
355355
356356
The new command ``jsonl`` can be used in pipelines as well. To get the maximum value in a sequence of jsonlines objects:
@@ -421,7 +421,7 @@ Pull text out of xml documents.
421421
422422
[[alias.stage]]
423423
command = "stack"
424-
options= {code="x.encode() ! io.BytesIO ! lxml.etree.parse ! x.findall(query) ! map(lambda y: y, x) ! list" }
424+
options= {code="x.encode() ! io.BytesIO ! lxml.etree.parse ! x.findall(query) ! list" }
425425
426426
[[alias.stage]]
427427
command="chain"

0 commit comments

Comments
 (0)