From 94dec7a4d64beb21058ba0063f60cfe692d12d81 Mon Sep 17 00:00:00 2001 From: Dev Ojha Date: Sat, 13 May 2023 17:10:31 +0200 Subject: [PATCH] perf: Remove indentation in REST respones (#16142) --- CHANGELOG.md | 1 + server/api/server.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b453112c0..318c71625c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -114,6 +114,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (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 * (store) [#16067](https://github.com/cosmos/cosmos-sdk/pull/16067) Add local snapshots management commands. +* (server) [#16142](https://github.com/cosmos/cosmos-sdk/pull/16142) Remove JSON Indentation from the GRPC to REST gateway's responses. (Saving bandwidth) ### State Machine Breaking diff --git a/server/api/server.go b/server/api/server.go index 6bceed5721..f28307f8ab 100644 --- a/server/api/server.go +++ b/server/api/server.go @@ -63,7 +63,7 @@ func New(clientCtx client.Context, logger log.Logger, grpcSrv *grpc.Server) *Ser // Using the gogo/gateway package with the gRPC-Gateway WithMarshaler option fixes the scalar field marshaling issue. marshalerOption := &gateway.JSONPb{ EmitDefaults: true, - Indent: " ", + Indent: "", OrigName: true, AnyResolver: clientCtx.InterfaceRegistry, }