JSON Proto changes
This commit is contained in:
+3
-3
@@ -254,7 +254,7 @@ func PostProcessResponseBare(w http.ResponseWriter, ctx context.CLIContext, body
|
||||
resp, err = marshaler.MarshalJSON(body)
|
||||
|
||||
if ctx.Indent && err == nil {
|
||||
resp, err = sdk.MarshalIndentFromJSON(resp)
|
||||
resp, err = codec.MarshalIndentFromJSON(resp)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
@@ -299,7 +299,7 @@ func PostProcessResponse(w http.ResponseWriter, ctx context.CLIContext, resp int
|
||||
result, err = marshaler.MarshalJSON(resp)
|
||||
|
||||
if ctx.Indent && err == nil {
|
||||
result, err = sdk.MarshalIndentFromJSON(result)
|
||||
result, err = codec.MarshalIndentFromJSON(result)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
@@ -312,7 +312,7 @@ func PostProcessResponse(w http.ResponseWriter, ctx context.CLIContext, resp int
|
||||
|
||||
output, err := marshaler.MarshalJSON(wrappedResp)
|
||||
if ctx.Indent && err == nil {
|
||||
output, err = sdk.MarshalIndentFromJSON(output)
|
||||
output, err = codec.MarshalIndentFromJSON(output)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
|
||||
@@ -19,7 +19,6 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/client/context"
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
"github.com/cosmos/cosmos-sdk/types"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
)
|
||||
|
||||
func TestBaseReq_Sanitize(t *testing.T) {
|
||||
@@ -210,7 +209,7 @@ func TestProcessPostResponse(t *testing.T) {
|
||||
expectedNoIndent, err := ctx.Codec.MarshalJSON(respNoIndent)
|
||||
require.Nil(t, err)
|
||||
|
||||
expectedWithIndent, err := sdk.MarshalIndentFromJSON(expectedNoIndent)
|
||||
expectedWithIndent, err := codec.MarshalIndentFromJSON(expectedNoIndent)
|
||||
require.Nil(t, err)
|
||||
|
||||
// check that negative height writes an error
|
||||
@@ -416,7 +415,7 @@ func runPostProcessResponse(t *testing.T, ctx context.CLIContext, obj interface{
|
||||
require.NoError(t, err)
|
||||
|
||||
if indent {
|
||||
marshalled, err = sdk.MarshalIndentFromJSON(marshalled)
|
||||
marshalled, err = codec.MarshalIndentFromJSON(marshalled)
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user