See this add-on on the kodi.tv showcase
Iterative JSON parser with standard Python iterator interfaces