support pretty json print at APIs