MCPcopy Create free account

hub / github.com/go-json-experiment/json / functions

Functions1,017 in github.com/go-json-experiment/json

↓ 5 callersFunctionfoldName
foldName returns a folded string such that foldName(x) == foldName(y) is similar to strings.EqualFold(x, y), but ignores underscore and dashes. This a
fold.go:17
↓ 5 callersMethodindex
index returns a reference to the ith entry. It is only valid until the next push method call.
jsontext/state.go:255
↓ 5 callersMethodinsert
insert inserts i into the set and reports whether it was the first insertion.
arshal_default.go:2026
↓ 5 callersFunctionisInvalidUTF8
(r rune, rn int)
internal/jsonwire/wire.go:207
↓ 5 callersFunctionleavePointer
(m *seenPointers, v reflect.Value)
arshal_default.go:73
↓ 5 callersFunctionmakeString
256*unsafe.Sizeof(string("")) => 4KiB makeString returns the string form of b. It returns a pre-allocated string from c if present, otherwise it alloc
intern.go:20
↓ 5 callersFunctionnewUnmarshalErrorBefore
newUnmarshalErrorBefore wraps err in a SemanticError assuming that d is positioned right before the next token or value, which causes an error. It doe
errors.go:138
↓ 5 callersFunctionparseHexUint16
parseHexUint16 is similar to strconv.ParseUint, but operates directly on []byte and is optimized for base-16. See https://go.dev/issue/42429.
internal/jsonwire/decode.go:568
↓ 5 callersMethodpopArray
popArray appends a JSON end array token as next in the sequence. If an error is returned, the state is not mutated.
jsontext/state.go:355
↓ 5 callersMethodpopObject
popObject appends a JSON end object token as next in the sequence. If an error is returned, the state is not mutated.
jsontext/state.go:320
↓ 5 callersMethodpushArray
pushArray appends a JSON begin array token as next in the sequence. If an error is returned, the state is not mutated.
jsontext/state.go:337
↓ 5 callersMethodpushObject
pushObject appends a JSON begin object token as next in the sequence. If an error is returned, the state is not mutated.
jsontext/state.go:302
↓ 5 callersFunctionstringOrNumberKind
(isString bool)
arshal_default.go:1994
↓ 5 callersFunctiontenc
(format string, a ...any)
v1/encode_test.go:1043
↓ 5 callersFunctionvisitPointer
visitPointer visits pointer p of type t, reporting an error if seen before. If successfully visited, then the caller must eventually call leave.
arshal_default.go:62
↓ 5 callersFunctionwriteComments
(out *bytes.Buffer, comments *ast.CommentGroup)
alias_gen.go:287
↓ 4 callersFunctionAppendFormat
AppendFormat formats the JSON value in src and appends it to dst according to the specified options. See [Value.Format] for more details about the for
jsontext/value.go:45
↓ 4 callersFunctionAppendUnquote
AppendUnquote appends the decoded interpretation of src as a double-quoted JSON string literal to dst and returns the extended buffer. The input src m
jsontext/alias.go:406
↓ 4 callersFunctionCompareUTF16
CompareUTF16 lexicographically compares x to y according to the UTF-16 codepoints of the UTF-8 encoded input strings. This implements the ordering spe
internal/jsonwire/wire.go:73
↓ 4 callersFunctionConsumeFalse
ConsumeFalse consumes the next JSON false literal per RFC 7159, section 3. It returns 0 if it is invalid, in which case ConsumeLiteral should be used.
internal/jsonwire/decode.go:54
↓ 4 callersFunctionConsumeNull
ConsumeNull consumes the next JSON null literal per RFC 7159, section 3. It returns 0 if it is invalid, in which case ConsumeLiteral should be used.
internal/jsonwire/decode.go:43
↓ 4 callersFunctionConsumeSimpleNumber
ConsumeSimpleNumber consumes the next JSON number per RFC 7159, section 6 but is limited to the grammar for a non-negative integer. It returns 0 if it
internal/jsonwire/decode.go:426
↓ 4 callersFunctionConsumeTrue
ConsumeTrue consumes the next JSON true literal per RFC 7159, section 3. It returns 0 if it is invalid, in which case ConsumeLiteral should be used.
internal/jsonwire/decode.go:65
↓ 4 callersMethodCountNextDelimWhitespace
CountNextDelimWhitespace counts the number of bytes of delimiter and whitespace bytes assuming the upcoming token is a JSON value. This method is used
jsontext/encode.go:611
↓ 4 callersFunctionDefaultOptionsV1
DefaultOptionsV1 is the full set of all options that define v1 semantics. It is equivalent to the following boolean options being set to true: - [Cal
v1/alias.go:563
↓ 4 callersFunctionExperimentalGlobalSupportFormatTag
ExperimentalGlobalSupportFormatTag globally enables [ExperimentalSupportFormatTag] for all calls to [Marshal], [MarshalWrite], [MarshalEncode], [Unmar
options_format_global.go:20
↓ 4 callersMethodMore
More reports whether there is another element in the current array or object being parsed.
v1/stream.go:268
↓ 4 callersMethodReset
Reset resets a decoder such that it is reading afresh from r and configured with the provided options. Reset must not be called on a Decoder passed to
jsontext/decode.go:132
↓ 4 callersMethodStackPointer
StackPointer returns a JSON Pointer (RFC 6901) to the most recently read value.
jsontext/decode.go:1211
↓ 4 callersFunctionTruncatePointer
TruncatePointer optionally truncates the JSON pointer, enforcing that the length roughly does not exceed n.
internal/jsonwire/wire.go:165
↓ 4 callersFunctionappendEscapedUTF16
(dst []byte, x uint16)
internal/jsonwire/encode.go:142
↓ 4 callersFunctionassertCastableTo
assertCastableTo asserts that "to" is a valid type to be casted to. These are the Go types that type-specific arshalers may operate upon. Let AllType
arshal_funcs.go:355
↓ 4 callersMethodcastTo
castTo casts va to the specified type. If the type is an interface, then the underlying type will always be a non-nil pointer to a concrete type. Req
arshal_funcs.go:408
↓ 4 callersFunctioncastableToFromAny
castableToFromAny reports whether "to" can be casted to from any of the dynamic types used to represent arbitrary JSON.
arshal_funcs.go:421
↓ 4 callersMethodcheckDelim
checkDelim checks whether delim is valid for the given next kind.
jsontext/decode.go:391
↓ 4 callersFunctioncollapseSemanticErrors
collapseSemanticErrors collapses double SemanticErrors at the outer levels into a single SemanticError by preserving the inner error, but prepending t
errors.go:304
↓ 4 callersFunctionconsumeTagOption
consumeTagOption consumes the next option, which is either a Go identifier or a single-quoted string. If the next option is invalid, it returns all of
fields.go:576
↓ 4 callersMethodconsumeValue
consumeValue consumes a single JSON value starting at d.buf[pos:]. It returns the new position in d.buf immediately after the value.
jsontext/decode.go:856
↓ 4 callersFunctionequalError
(a, b error)
v1/decode_test.go:1420
↓ 4 callersFunctionequalTokens
equalTokens reports whether to sequences of tokens formats the same way.
jsontext/decode_test.go:28
↓ 4 callersMethodfieldByIndex
(index []int, mayAlloc bool)
arshal_default.go:1421
↓ 4 callersFunctiongetBufferedEncoder
(opts ...Options)
jsontext/pools.go:44
↓ 4 callersFunctionhasEscapedUTF16Prefix
hasEscapedUTF16Prefix reports whether b is possibly the truncated prefix of a \uFFFF escape sequence.
internal/jsonwire/decode.go:390
↓ 4 callersFunctionhash64
hash64 returns the hash of two uint32s as a single uint32.
intern.go:58
↓ 4 callersMethodinitFormat
(format string)
arshal_time.go:292
↓ 4 callersFunctionmarshalValueAny
This file contains an optimized marshal and unmarshal implementation for the any type. This type is often used when the Go program has no knowledge of
arshal_any.go:32
↓ 4 callersMethodmergeRound
mergeRound updates a value in the final round.
internal/zstd/xxhash.go:143
↓ 4 callersMethodmoreBits
moreBits is called to read more bits. This ensures that at least 16 bits are available.
internal/zstd/bits.go:36
↓ 4 callersFunctionmustGet
(v T, err error)
alias_gen.go:282
↓ 4 callersFunctionnewInvalidUTF8Error
(offset int64, pointer jsontext.Pointer)
arshal_test.go:43
↓ 4 callersFunctionnewParseTimeError
(layout, value, layoutElem, valueElem, message string)
arshal_test.go:47
↓ 4 callersFunctionnewSemanticErrorWithPosition
newSemanticErrorWithPosition wraps err in a SemanticError assuming that the error occurred at the provided depth, and length. If err is already a Sema
errors.go:219
↓ 4 callersFunctionputBufferedEncoder
(e *Encoder)
jsontext/pools.go:56
↓ 4 callersFunctiontoUnexpectedEOF
toUnexpectedEOF converts [io.EOF] to [io.ErrUnexpectedEOF].
errors.go:460
↓ 4 callersMethodunmarshal
(b []byte)
arshal_time.go:266
↓ 4 callersMethodunreadBuffer
()
jsontext/decode.go:284
↓ 3 callersFunctionAppendQuote
AppendQuote appends a double-quoted JSON string literal representing src to dst and returns the extended buffer. It uses the minimal string representa
jsontext/alias.go:395
↓ 3 callersMethodCanonicalize
Canonicalize canonicalizes the raw JSON value according to the JSON Canonicalization Scheme (JCS) as defined by RFC 8785 where it produces a stable re
jsontext/value.go:227
↓ 3 callersFunctionCanonicalizeRawFloats
CanonicalizeRawFloats specifies that when encoding a raw JSON floating-point number (i.e., a number with a fraction or exponent) in a [Token] or [Valu
jsontext/alias.go:314
↓ 3 callersFunctionCanonicalizeRawInts
CanonicalizeRawInts specifies that when encoding a raw JSON integer number (i.e., a number without a fraction and exponent) in a [Token] or [Value], t
jsontext/alias.go:297
↓ 3 callersMethodCheckEOF
CheckEOF verifies that the input has no more data.
jsontext/decode.go:806
↓ 3 callersMethodCompact
Compact removes all whitespace from the raw JSON value. It does not reformat JSON strings or numbers to use any other representation. To maximize the
jsontext/value.go:164
↓ 3 callersFunctionConsumeString
ConsumeString consumes the next JSON string per RFC 7159, section 7. If validateUTF8 is false, then this allows the presence of invalid UTF-8 characte
internal/jsonwire/decode.go:117
↓ 3 callersFunctionEscapeForHTML
EscapeForHTML specifies that '<', '>', and '&' characters within JSON strings should be escaped as a hexadecimal Unicode codepoint (e.g., \u003c) so t
jsontext/alias.go:258
↓ 3 callersMethodGetBufferedDecoder
(b []byte, o ...Options)
jsontext/export.go:74
↓ 3 callersFunctionHasSuffixByte
HasSuffixByte reports whether b ends with c.
internal/jsonwire/wire.go:47
↓ 3 callersMethodInsertUnquoted
(name []byte)
jsontext/state.go:768
↓ 3 callersFunctionJoinOptions
JoinOptions coalesces the provided list of options into a single Options. Properties set in later options override the value of previously set propert
alias.go:803
↓ 3 callersMethodMarshalJSON
()
arshal_methods.go:50
↓ 3 callersFunctionMarshalWrite
MarshalWrite serializes a Go value into an [io.Writer] according to the provided marshal and encode options (while ignoring unmarshal or decode option
alias.go:357
↓ 3 callersMethodNeedIndent
NeedIndent reports whether indent whitespace should be injected. A zero value means that no whitespace should be injected. A positive value means '\n'
jsontext/state.go:372
↓ 3 callersMethodPeekKind
()
jsontext/decode.go:317
↓ 3 callersMethodPutBufferedDecoder
(d *Decoder)
jsontext/export.go:77
↓ 3 callersMethodReadToken
()
jsontext/decode.go:471
↓ 3 callersFunctionReformatString
ReformatString consumes a JSON string from src and appends it to dst, reformatting it if necessary according to the specified flags. It returns the ap
internal/jsonwire/encode.go:150
↓ 3 callersFunctionRejectUnknownMembers
RejectUnknownMembers specifies that unknown members should be rejected when unmarshaling a JSON object. This only affects unmarshaling and is ignored
alias.go:923
↓ 3 callersFunctionReorderRawObjects
ReorderRawObjects specifies that when encoding a raw JSON object in a [Value], the object members are reordered according to RFC 8785, section 3.2.3.
jsontext/alias.go:323
↓ 3 callersMethodSetIndent
SetIndent instructs the encoder to format each subsequent encoded value as if indented by the package-level function Indent(dst, src, prefix, indent).
v1/stream.go:166
↓ 3 callersMethodStackPointer
StackPointer returns a JSON Pointer (RFC 6901) to the most recently written value.
jsontext/encode.go:986
↓ 3 callersFunctionString
String constructs a Token representing a JSON string. The provided string should contain valid UTF-8, otherwise invalid characters may be mangled as t
jsontext/token.go:143
↓ 3 callersFunctionTrimSuffixByte
TrimSuffixByte removes c from the end of b if it is present.
internal/jsonwire/wire.go:53
↓ 3 callersMethodUnmarshalJSON
([]byte)
arshal_methods.go:94
↓ 3 callersFunctionUnmarshalRead
UnmarshalRead deserializes a Go value from an [io.Reader] according to the provided unmarshal and decode options (while ignoring marshal or encode opt
alias.go:513
↓ 3 callersMethodUnmarshalText
(val []byte)
arshal_test.go:640
↓ 3 callersFunctionappendEscapePointerName
(b, name []byte)
jsontext/state.go:205
↓ 3 callersMethodappendWhitespace
appendWhitespace appends whitespace that immediately precedes the next token.
jsontext/encode.go:635
↓ 3 callersFunctionbenchMarshalBytes
(n int)
v1/bench_test.go:170
↓ 3 callersFunctionbenchMarshalBytesError
(n int)
v1/bench_test.go:188
↓ 3 callersMethodcheckDelimBeforeIOError
checkDelimBeforeIOError checks whether the delim is even valid before returning an IO error, which occurs after the delim.
jsontext/decode.go:369
↓ 3 callersMethodconsumeLiteral
consumeLiteral consumes a single JSON literal starting at d.buf[pos:]. It returns the new position in d.buf immediately after the literal.
jsontext/decode.go:908
↓ 3 callersFunctionconsumeSign
consumeSign consumes an optional leading negative or positive sign.
arshal_time.go:765
↓ 3 callersMethodconsumeString
consumeString consumes a single JSON string starting at d.buf[pos:]. It returns the new position in d.buf immediately after the string.
jsontext/decode.go:926
↓ 3 callersMethoddecrement
decrement decrements the number of elements for the current object or array. It is the caller's responsibility to ensure that e.length > 0.
jsontext/state.go:506
↓ 3 callersFunctionfoldRune
foldRune is a variation on unicode.SimpleFold that returns the same rune for all runes in the same fold set. Invariant: foldRune(x) == foldRune(y)
fold.go:50
↓ 3 callersFunctiongenValue
(n int)
v1/scanner_test.go:246
↓ 3 callersFunctiongetBufferedDecoder
(b []byte, opts ...Options)
jsontext/pools.go:132
↓ 3 callersFunctiongetStrings
getStrings returns a non-nil pointer to a slice with length n.
arshal.go:554
↓ 3 callersMethodhas
has reports whether i is in the set.
arshal_default.go:2015
↓ 3 callersMethodindirect
(mayAlloc bool)
arshal_default.go:1432
↓ 3 callersFunctionindirectType
indirectType unwraps one level of pointer indirection similar to how Go only allows embedding either T or *T, but not **T or P (which is a named point
fields.go:360
← previousnext →201–300 of 1,017, ranked by callers