Skip to content

Commit

Permalink
fix: fix unicode encoding for json (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] committed Feb 1, 2025
1 parent e7a37a1 commit 8cf4f32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/apijson/encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func (e *encoder) newPrimitiveTypeEncoder(t reflect.Type) encoderFunc {
// code more and this current code shouldn't cause any issues
case reflect.String:
return func(v reflect.Value) ([]byte, error) {
return []byte(fmt.Sprintf("%q", v.String())), nil
return json.Marshal(v.Interface())
}
case reflect.Bool:
return func(v reflect.Value) ([]byte, error) {
Expand Down

0 comments on commit 8cf4f32

Please sign in to comment.