use a 'formatter' for all json writting, JSON.pretty_generate to make diffs prettier