<s> import json <EOL> _decoder = json . JSONDecoder ( ) <EOL> def loads ( s ) : <EOL> """<STR_LIT>""" <EOL> while s : <EOL> s = s . strip ( ) <EOL> obj , pos = _decoder . raw_decode ( s ) <EOL> if not pos : <EOL> raise ValueError ( '<STR_LIT>' % pos ) <EOL> yield obj <EOL> s = s [ pos : ] </s>
