Generate and output json pretty result