๐ Application Programming Interface#
galactic.io.data.json
module
Class
JSONDataReader
for reading.json
file
- class JSONDataReader#
Bases:
object
JSON
Data reader.Example
>>> from pprint import pprint >>> from galactic.io.data.json import JSONDataReader >>> reader = JSONDataReader() >>> import io >>> text = ''' ... { ... "#1": { ... "name": "Galois", ... "firstname": "รvariste" ... }, ... "#2": { ... "name": "Wille", ... "firstname": "Rudolf" ... } ... } ... ''' >>> data = reader.read(io.StringIO(text)) >>> pprint(data) {'#1': frozendict.frozendict({'name': 'Galois', 'firstname': 'รvariste'}), '#2': frozendict.frozendict({'name': 'Wille', 'firstname': 'Rudolf'})}