functional iterative JSONification