Json pretty formatter support

This change enables choosing between json.MarshalIndent and json.Marshal.