$14 GRAYBYTE WORDPRESS FILE MANAGER $40

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/lib/golang/src/encoding/json/jsontext/

HOME
Current File : /lib/golang/src/encoding/json/jsontext//quote.go
// Copyright 2023 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build goexperiment.jsonv2

package jsontext

import (
	"encoding/json/internal/jsonflags"
	"encoding/json/internal/jsonwire"
)

// AppendQuote appends a double-quoted JSON string literal representing src
// to dst and returns the extended buffer.
// It uses the minimal string representation per RFC 8785, section 3.2.2.2.
// Invalid UTF-8 bytes are replaced with the Unicode replacement character
// and an error is returned at the end indicating the presence of invalid UTF-8.
// The dst must not overlap with the src.
func AppendQuote[Bytes ~[]byte | ~string](dst []byte, src Bytes) ([]byte, error) {
	dst, err := jsonwire.AppendQuote(dst, src, &jsonflags.Flags{})
	if err != nil {
		err = &SyntacticError{Err: err}
	}
	return dst, err
}

// AppendUnquote appends the decoded interpretation of src as a
// double-quoted JSON string literal to dst and returns the extended buffer.
// The input src must be a JSON string without any surrounding whitespace.
// Invalid UTF-8 bytes are replaced with the Unicode replacement character
// and an error is returned at the end indicating the presence of invalid UTF-8.
// Any trailing bytes after the JSON string literal results in an error.
// The dst must not overlap with the src.
func AppendUnquote[Bytes ~[]byte | ~string](dst []byte, src Bytes) ([]byte, error) {
	dst, err := jsonwire.AppendUnquote(dst, src)
	if err != nil {
		err = &SyntacticError{Err: err}
	}
	return dst, err
}

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
16 Dec 2025 9.30 PM
root / root
0755
decode.go
37.197 KB
4 Dec 2025 6.06 PM
root / root
0644
doc.go
5.44 KB
4 Dec 2025 6.06 PM
root / root
0644
encode.go
30.571 KB
4 Dec 2025 6.06 PM
root / root
0644
errors.go
5.958 KB
4 Dec 2025 6.06 PM
root / root
0644
export.go
2.295 KB
4 Dec 2025 6.06 PM
root / root
0644
options.go
11.165 KB
4 Dec 2025 6.06 PM
root / root
0644
pools.go
5.146 KB
4 Dec 2025 6.06 PM
root / root
0644
quote.go
1.561 KB
4 Dec 2025 6.06 PM
root / root
0644
state.go
26.982 KB
4 Dec 2025 6.06 PM
root / root
0644
token.go
14.811 KB
4 Dec 2025 6.06 PM
root / root
0644
value.go
13.454 KB
4 Dec 2025 6.06 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF