Documentation ¶
Overview ¶
Copyright (c) 2009 The Go Authors. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copyright (c) 2009 The Go Authors. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copyright (c) 2009 The Go Authors. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Index ¶
- func AppendEncodedString(buf []byte, s string, escapeHTML bool) []byte
- func BackslashBytes() []byte
- func BoolBytes(v bool) []byte
- func CanMarshalAsText(ty reflect.Type) bool
- func CanUnmarshalAsText(ty reflect.Type) bool
- func EmptyObjectBytes() []byte
- func EncodeFloat32(w io.Writer, f float32) error
- func EncodeFloat64(w io.Writer, f float64) error
- func EncodeString(w io.Writer, s string, escapeHTML bool) error
- func EncodeStringBytes(w io.Writer, s []byte, escapeHTML bool) error
- func EndDelim(d json.Delim) json.Delim
- func FalseBytes() []byte
- func IsBackslashBytes(b []byte) bool
- func IsFalseBytes(b []byte) bool
- func IsHtmlSafeRune(r rune) bool
- func IsNullBytes(b []byte) bool
- func IsPrimitiveTextType(ty reflect.Type) bool
- func IsQuoteBytes(b []byte) bool
- func IsSafeRune(r rune) bool
- func IsTrueBytes(b []byte) bool
- func IsValidNumber(s string) bool
- func MarshalAsText(v reflect.Value) (string, error)
- func MarshalIndentString(v any, prefix, indent string) (string, error)
- func MarshalPretty(v any) (string, error)
- func MarshalString(v any) (string, error)
- func NullBytes() []byte
- func QuoteBytes() []byte
- func RawFieldOf(k string, v json.RawMessage) bt.Kv[string, json.RawMessage]
- func ReadDelim(dec *json.Decoder) (json.Delim, error)
- func TrueBytes() []byte
- func UnmarshalAs[T any](b []byte) (v T, err error)
- func UnmarshalAsText(s string, v reflect.Value) error
- func UnmarshalObjectFields[K, V any](b []byte) ([]bt.Kv[K, V], error)
- func UnmarshalRawObjectFields[K, V any](o RawObject) ([]bt.Kv[K, V], error)
- func Unquote(s []byte) (t string, ok bool)
- func UnquoteBytes(s []byte) (t []byte, ok bool)
- type RawField
- type RawObject
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendEncodedString ¶
FIXME: :|
func BackslashBytes ¶
func BackslashBytes() []byte
func CanMarshalAsText ¶
func CanUnmarshalAsText ¶
func EmptyObjectBytes ¶
func EmptyObjectBytes() []byte
func EncodeStringBytes ¶
NOTE: keep in sync with string above.
func FalseBytes ¶
func FalseBytes() []byte
func IsBackslashBytes ¶
func IsFalseBytes ¶
func IsHtmlSafeRune ¶
func IsNullBytes ¶
func IsPrimitiveTextType ¶
func IsQuoteBytes ¶
func IsSafeRune ¶
func IsTrueBytes ¶
func IsValidNumber ¶
isValidNumber reports whether s is a valid JSON number literal.
func MarshalPretty ¶
func MarshalString ¶
func QuoteBytes ¶
func QuoteBytes() []byte
func RawFieldOf ¶
func RawFieldOf(k string, v json.RawMessage) bt.Kv[string, json.RawMessage]
func UnmarshalAs ¶
func Unquote ¶
unquote converts a quoted JSON string literal s into an actual string t. The rules are different than for Go, so cannot use strconv.Unquote.
func UnquoteBytes ¶
Types ¶
type RawObject ¶
type RawObject []RawField