def import_from_json(filename_or_fobj, encoding="<STR_LIT:utf-8>", *args, **kwargs):
source = Source.from_file(filename_or_fobj, mode="<STR_LIT:rb>", plugin_name="<STR_LIT>", encoding=encoding)<EOL>json_obj = json.load(source.fobj, encoding=source.encoding)<EOL>field_names = list(json_obj[<NUM_LIT:0>].keys())<EOL>table_rows = [[item[key] for key in field_names] for item in json_obj]<EOL>meta = {"<STR_LIT>": "<STR_LIT>", "<STR_LIT:source>": source}<EOL>return create_table([field_names] + table_rows, meta=meta, *args, **kwargs)<EOL>
Import a JSON file or file-like object into a `rows.Table`.

    If a file-like object is provided it MUST be open in text (non-binary) mode
    on Python 3 and could be open in both binary or text mode on Python 2.