export a level-db database to a JSON stream