Migrating to a json format output