May-05-2020, 06:17 AM
json.load()
returns a python object. For instance it might be a deeply-nested set of dictionaries or lists. re.findall
takes a single string and operates on it, not a dict or list.I wouldn't recommend regex on a JSON file, but if that's what you're trying to do, just read the file as text (a la
open()
).