Skip to content

JSONStream is python library that enables parsing distinct JSON objects from an input stream

License

Notifications You must be signed in to change notification settings

qrtz/JSONStream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

JSONStream

JSONStream is python library that enables parsing distinct JSON objects from an input stream

Example Usage

from StringIO import StringIO
from JSONStream import JSONStream

 cities = StringIO('''
    {"name": "London"}
    {"name": "Milan"}
    {"name": "New york"}
    {"name": "Paris"}
''')

 for city in JSONStream(cities):
    print(city["name"])

If the above data is stored in a file. We can do the following

 import JSONStream import JSONStream

 with open('cities.json') as cities:
     for city in JSONStream(cities):
        print(city["name"])

About

JSONStream is python library that enables parsing distinct JSON objects from an input stream

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages