mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-08-08 22:36:48 +02:00
fix streaming python module example
This commit is contained in:
@ -277,12 +277,11 @@ Streaming parsers accept any iterable object and return a generator iterator obj
|
||||
To use the generator object in your code, simply loop through it:
|
||||
|
||||
```
|
||||
import json
|
||||
import jc.parsers.ls_s
|
||||
|
||||
result = jc.parsers.ls_s.parse(ls_command_output.splitlines())
|
||||
for item in result:
|
||||
item_dict = json.loads(item)
|
||||
print(item["filename"])
|
||||
```
|
||||
|
||||
### Custom Parsers
|
||||
|
@ -200,12 +200,11 @@ Streaming parsers accept any iterable object and return a generator iterator obj
|
||||
To use the generator object in your code, simply loop through it:
|
||||
|
||||
```
|
||||
import json
|
||||
import jc.parsers.ls_s
|
||||
|
||||
result = jc.parsers.ls_s.parse(ls_command_output.splitlines())
|
||||
for item in result:
|
||||
item_dict = json.loads(item)
|
||||
print(item["filename"])
|
||||
```
|
||||
|
||||
### Custom Parsers
|
||||
|
Reference in New Issue
Block a user