Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions gateway/router/marshal/json/marshaller_strings.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package json

import (
"strings"
"unsafe"

"github.com/francoispqt/gojay"
"github.com/viant/tagly/format"
"github.com/viant/xunsafe"
"strings"
"unsafe"
)

type stringMarshaller struct {
Expand Down Expand Up @@ -67,11 +68,11 @@ func marshallString(asString string, sb *MarshallSession, _ *strings.Replacer) {
case '\f':
sb.WriteString(`\\f`)
case '\n':
sb.WriteString(`\\n`)
sb.WriteString(`\n`)
case '\r':
sb.WriteString(`\\r`)
case '\t':
sb.WriteString(`\\t`)
sb.WriteString(`\t`)
default:
// Escape other control characters < 0x20 as \u00XX
if c < 0x20 {
Expand Down
Loading