* Beginning of abstracting rows2json out of hackfoldr-2.0