I have a file that contains a stream of JSON dictionaries like this:
{"menu": "a"}{"c": []}{"d": [3, 2]}{"e": "}"}
It also includes nested dictionaries and it looks like I cannot rely on a newline being a separator. I need a parser that could be used like this:
for d in getobjects(f):handle_dict(d)
The point is that it would be perfect if the iteration only happened at the root level. Is there a Python parser that would handle all JSON's quirks? I am interested in a solution that would work on files that wouldn't fit into RAM.