We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9e5d263 commit 6e6d34cCopy full SHA for 6e6d34c
internal/apijson/encoder.go
@@ -143,7 +143,7 @@ func (e *encoder) newPrimitiveTypeEncoder(t reflect.Type) encoderFunc {
143
// code more and this current code shouldn't cause any issues
144
case reflect.String:
145
return func(v reflect.Value) ([]byte, error) {
146
- return []byte(fmt.Sprintf("%q", v.String())), nil
+ return json.Marshal(v.Interface())
147
}
148
case reflect.Bool:
149
0 commit comments