From 83d600596f5df785524dc3299719eca86ec44ec5 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sat, 13 May 2023 17:00:18 +0000 Subject: [PATCH] perf: Remove indentation in REST respones (backport #16142) (#16143) --- CHANGELOG.md | 1 + server/api/server.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 864a2f89a62f..3bf9205da6eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (store) [#16067](https://github.com/cosmos/cosmos-sdk/pull/16067) Add local snapshots management commands. * (server) [#16061](https://github.com/cosmos/cosmos-sdk/pull/16061) Add Comet bootstrap command. * (x/staking) [#16068](https://github.com/cosmos/cosmos-sdk/pull/16068) Update simulation to allow non-EOA accounts to stake. +* (server) [#16142](https://github.com/cosmos/cosmos-sdk/pull/16142) Remove JSON Indentation from the GRPC to REST gateway's responses. (Saving bandwidth) ### Bug Fixes diff --git a/server/api/server.go b/server/api/server.go index 946e49eb0933..917554857b31 100644 --- a/server/api/server.go +++ b/server/api/server.go @@ -57,7 +57,7 @@ func New(clientCtx client.Context, logger log.Logger) *Server { // Using the gogo/gateway package with the gRPC-Gateway WithMarshaler option fixes the scalar field marshalling issue. marshalerOption := &gateway.JSONPb{ EmitDefaults: true, - Indent: " ", + Indent: "", OrigName: true, AnyResolver: clientCtx.InterfaceRegistry, }