Skip to content

Commit

Permalink
fix: fix unicode encoding for json (#306)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Jan 31, 2025
1 parent 7ca7290 commit c839501
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 c839501

Please sign in to comment.