output pretty json by default; support unix piping