diff --git a/README.md b/README.md index 013ced1d..a6820b4f 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/templates/readme_template b/templates/readme_template index 2b59c47f..372c333f 100644 --- a/templates/readme_template +++ b/templates/readme_template @@ -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