[refactor] make the output cleaner for JSON and smaller