summaryrefslogtreecommitdiff
path: root/vendor/github.com/bytedance/sonic/encoder
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/bytedance/sonic/encoder')
-rw-r--r--vendor/github.com/bytedance/sonic/encoder/encoder_compat.go2
-rw-r--r--vendor/github.com/bytedance/sonic/encoder/encoder_native.go11
2 files changed, 7 insertions, 6 deletions
diff --git a/vendor/github.com/bytedance/sonic/encoder/encoder_compat.go b/vendor/github.com/bytedance/sonic/encoder/encoder_compat.go
index d48e99b1f..a7350548a 100644
--- a/vendor/github.com/bytedance/sonic/encoder/encoder_compat.go
+++ b/vendor/github.com/bytedance/sonic/encoder/encoder_compat.go
@@ -1,4 +1,4 @@
-// +build !amd64,!arm64 go1.25 !go1.17 arm64,!go1.20
+// +build !amd64,!arm64 go1.26 !go1.17 arm64,!go1.20
/*
* Copyright 2023 ByteDance Inc.
diff --git a/vendor/github.com/bytedance/sonic/encoder/encoder_native.go b/vendor/github.com/bytedance/sonic/encoder/encoder_native.go
index 2881da8d7..bfed805fd 100644
--- a/vendor/github.com/bytedance/sonic/encoder/encoder_native.go
+++ b/vendor/github.com/bytedance/sonic/encoder/encoder_native.go
@@ -1,4 +1,4 @@
-// +build amd64,go1.17,!go1.25 arm64,go1.20,!go1.25
+// +build amd64,go1.17,!go1.26 arm64,go1.20,!go1.26
/*
* Copyright 2023 ByteDance Inc.
@@ -71,7 +71,8 @@ const (
// CompatibleWithStd is used to be compatible with std encoder.
CompatibleWithStd Options = encoder.CompatibleWithStd
- // Encode Infinity or Nan float into `null`, instead of returning an error.
+ // EncodeNullForInfOrNan encodes Infinity or NaN float values as 'null'
+ // instead of returning an error.
EncodeNullForInfOrNan Options = encoder.EncodeNullForInfOrNan
)
@@ -80,12 +81,12 @@ var (
// Encode returns the JSON encoding of val, encoded with opts.
Encode = encoder.Encode
- // EncodeInto is like Encode but uses a user-supplied buffer instead of allocating a new one.
- EncodeIndented = encoder.EncodeIndented
-
// EncodeIndented is like Encode but applies Indent to format the output.
// Each JSON element in the output will begin on a new line beginning with prefix
// followed by one or more copies of indent according to the indentation nesting.
+ EncodeIndented = encoder.EncodeIndented
+
+ // EncodeInto is like Encode but uses a user-supplied buffer instead of allocating a new one.
EncodeInto = encoder.EncodeInto
// HTMLEscape appends to dst the JSON-encoded src with <, >, &, U+2028 and U+2029