diff --git a/router/response.go b/router/response.go index 39a1576..34e9de3 100644 --- a/router/response.go +++ b/router/response.go @@ -11,8 +11,17 @@ import ( ) var jpb = &protojson.MarshalOptions{ - UseEnumNumbers: false, - Indent: " ", + // Multiline: false, + Indent: " ", + // AllowPartial: false, + // UseProtoNames: false, + // UseEnumNumbers: false, + // EmitUnpopulated: false, + EmitDefaultValues: true, +} + +func SetMarshalOptions(opt *protojson.MarshalOptions) { + jpb = opt } // ProtoOK renders a 200 response with JSON-serialized proto