MCPcopy Create free account

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

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

↓ 12 callersMethodMayAppendDelim
MayAppendDelim appends a colon or comma that may precede the next token.
jsontext/state.go:389
↓ 12 callersMethodNeedFlush
NeedFlush determines whether to flush at this point.
jsontext/encode.go:147
↓ 12 callersFunctionlookupArshaler
map[reflect.Type]*arshaler
arshal.go:535
↓ 12 callersFunctionmayAppendSupportFormatTag
(opts []Options)
options_format_global.go:24
↓ 12 callersFunctionwrapErrUnsupported
(err error, what string)
errors.go:315
↓ 11 callersFunctionAppendFloat
AppendFloat appends src to dst as a JSON number per RFC 7159, section 6. It formats numbers similar to the ES6 number-to-string conversion. See https:
internal/jsonwire/encode.go:213
↓ 11 callersMethodClear
Clear clears both the presence and value for the provided bool or bools. The value bit of f (i.e., the LSB) is ignored.
internal/jsonflags/flags.go:216
↓ 11 callersMethodClone
Clone returns a copy of v.
jsontext/value.go:69
↓ 11 callersFunctionInt
Int constructs a Token representing a JSON number from an int64.
jsontext/alias.go:507
↓ 11 callersFunctionJoinUnmarshalers
JoinUnmarshalers constructs a flattened list of unmarshal functions. If multiple functions in the list are applicable for a value of a given type, the
alias.go:575
↓ 11 callersMethodOptions
()
errors.go:103
↓ 11 callersFunctionSpaceAfterComma
SpaceAfterComma specifies that the JSON output should emit a space character after each comma separator following a JSON object value or array element
jsontext/alias.go:341
↓ 11 callersMethodToken
Token returns the next JSON token in the input stream. At the end of the input stream, Token returns nil, [io.EOF]. Token guarantees that the delimit
v1/stream.go:220
↓ 11 callersMethodisValidNamespace
isValidNamespace reports whether the JSON object namespace is valid.
jsontext/state.go:528
↓ 11 callersFunctionnewUnmarshalErrorAfterWithValue
newUnmarshalErrorAfterWithValue wraps err in a SemanticError assuming that d is positioned right after the previous token or value, which caused an er
errors.go:184
↓ 11 callersFunctiontransformSyntacticError
(err error)
v1/scanner.go:56
↓ 10 callersFunctionConsumeSimpleString
ConsumeSimpleString consumes the next JSON string per RFC 7159, section 7 but is limited to the grammar for an ASCII string without escape sequences.
internal/jsonwire/decode.go:97
↓ 10 callersMethodContains
Contains reports whether the JSON value that p points to is equal to or contains the JSON value that pc points to.
jsontext/state.go:113
↓ 10 callersMethodDepthLength
DepthLength reports the current nested depth and the length of the last JSON object or array.
jsontext/state.go:264
↓ 10 callersFunctionFloat32
Float32 constructs a Token representing a JSON number as a 32-bit floating-point number formatted according to ECMA-262, 10th edition, section 7.1.12.
jsontext/token.go:162
↓ 10 callersMethodIndent
Indent reformats the whitespace in the raw JSON value so that each element in a JSON object or array begins on an indented line according to the nesti
jsontext/value.go:187
↓ 10 callersMethodParent
Parent strips off the last token and returns the remaining pointer. The parent of an empty p is an empty string.
jsontext/state.go:121
↓ 10 callersFunctionParseUint
ParseUint parses b as a decimal unsigned integer according to a strict subset of the JSON number grammar, returning the value if valid. It returns (0,
internal/jsonwire/decode.go:593
↓ 10 callersMethodString
()
arshal_test.go:734
↓ 10 callersMethodappendLiteral
appendLiteral appends a JSON literal as the next token in the sequence. If an error is returned, the state is not mutated.
jsontext/state.go:270
↓ 10 callersFunctionnewNonStringNameError
(offset int64, pointer jsontext.Pointer)
arshal_test.go:35
↓ 10 callersMethodround
round updates a value.
internal/zstd/xxhash.go:135
↓ 10 callersFunctionrunTestOrBench
(tb testing.TB, name string, numBytes int64, run func(tb testing.TB))
bench_test.go:633
↓ 9 callersFunctionNewEncoder
NewEncoder returns a new encoder that writes to w.
v1/alias.go:850
↓ 9 callersMethodStackPointer
()
errors.go:102
↓ 9 callersFunctionWithIndent
WithIndent specifies that the encoder should emit multiline output where each element in a JSON object or array begins on a new, indented line beginni
jsontext/alias.go:373
↓ 9 callersFunctiondiff
(t *testing.T, a, b []byte)
v1/scanner_test.go:212
↓ 9 callersMethodisObject
isObject reports whether this is a JSON object.
jsontext/state.go:463
↓ 9 callersFunctionisSyntacticError
(err error)
errors.go:53
↓ 9 callersMethodunmarshal
(b []byte)
arshal_time.go:394
↓ 9 callersMethodwrapNonEOFError
(off int, err error)
internal/zstd/zstd.go:489
↓ 8 callersMethodAppendRaw
AppendRaw appends either a raw string (without double quotes) or number. Specify safeASCII if the string output is guaranteed to be ASCII without any
jsontext/encode.go:443
↓ 8 callersMethodBool
Bool returns the value for a JSON boolean. It panics if the token kind is not a JSON boolean.
jsontext/token.go:244
↓ 8 callersFunctionConsumeLiteral
ConsumeLiteral consumes the next JSON literal per RFC 7159, section 3. If the input appears truncated, it returns io.ErrUnexpectedEOF.
internal/jsonwire/decode.go:76
↓ 8 callersFunctionQuoteRune
QuoteRune quotes the first rune in the input.
internal/jsonwire/wire.go:62
↓ 8 callersFunctionimplements
implements is like t.Implements(ifaceType) but checks whether either t or reflect.PointerTo(t) implements the interface. It also reports whether the v
arshal_methods.go:369
↓ 8 callersMethodinsertQuoted
insertQuoted inserts a name and reports whether it was inserted, which only occurs if name is not already in the namespace. The provided name must be
jsontext/state.go:762
↓ 8 callersMethodisActiveNamespace
isActiveNamespace reports whether the JSON object namespace is actively being updated and used for duplicate name checks.
jsontext/state.go:518
↓ 8 callersFunctionisFatalError
isFatalError reports whether this error must terminate arshaling. All errors are considered fatal unless operating under [jsonflags.ReportErrorsWithLe
errors.go:62
↓ 8 callersMethodisNumeric
()
arshal_time.go:360
↓ 8 callersMethodneedDelim
needDelim reports whether a colon or comma token should be implicitly emitted before the next token of the specified kind. A zero value means no delim
jsontext/state.go:403
↓ 8 callersMethodpreviousBuffer
()
jsontext/decode.go:283
↓ 8 callersMethodpreviousOffsetStart
()
jsontext/decode.go:281
↓ 8 callersMethodwrapError
(off int, err error)
internal/zstd/zstd.go:500
↓ 7 callersFunctionAppendUnquote
AppendUnquote appends the unescaped form of a JSON string in src to dst. Any invalid UTF-8 within the string will be replaced with utf8.RuneError, but
internal/jsonwire/decode.go:257
↓ 7 callersFunctionConsumeNumber
ConsumeNumber consumes the next JSON number per RFC 7159, section 6. It reports the number of bytes consumed and whether an error was encountered. If
internal/jsonwire/decode.go:465
↓ 7 callersFunctionDefaultOptionsV2
DefaultOptionsV2 is the full set of all options that define v2 semantics. It is equivalent to the set of options in [encoding/json.DefaultOptionsV1] a
alias.go:826
↓ 7 callersMethodError
()
errors.go:335
↓ 7 callersMethodError
()
jsontext/errors.go:26
↓ 7 callersMethodFloat
Float returns the floating-point value for a JSON number parsed according to 64 bits of precision. If the JSON number is outside the representable ra
jsontext/token.go:386
↓ 7 callersMethodKind
Kind returns the token kind.
jsontext/token.go:603
↓ 7 callersFunctionSpaceAfterColon
SpaceAfterColon specifies that the JSON output should emit a space character after each colon separator following a JSON object name. If false, then n
jsontext/alias.go:332
↓ 7 callersMethodUnreadBuffer
UnreadBuffer returns the data remaining in the unread buffer, which may contain zero or more bytes. This is the data already consumed from the input [
jsontext/decode.go:1154
↓ 7 callersFunctioncodeInit
()
v1/bench_test.go:44
↓ 7 callersMethodformat
format accepts two []Options to avoid the allocation of appending them together. It is equivalent to v.Format(append(opts1, opts2...)...).
jsontext/value.go:137
↓ 7 callersMethodisArray
isArray reports whether this is a JSON array.
jsontext/state.go:468
↓ 7 callersMethodmakeReverseBitReader
makeReverseBitReader makes a reverseBitReader reading backward from off to start. The bitstream starts with a 1 bit in the last byte, at off.
internal/zstd/bits.go:83
↓ 6 callersMethodAppendIndent
AppendIndent appends the appropriate number of indentation characters for the current nested level, n.
jsontext/encode.go:653
↓ 6 callersMethodAppendStackPointer
(b []byte, where int)
jsontext/encode.go:990
↓ 6 callersMethodDisableNamespace
DisableNamespace disables the JSON object namespace such that the Encoder or Decoder no longer updates the namespace.
jsontext/state.go:512
↓ 6 callersFunctionIndent
Indent appends to dst an indented form of the JSON-encoded src. Each element in a JSON object or array begins on a new, indented line beginning with p
v1/alias.go:517
↓ 6 callersFunctionPreserveRawStrings
PreserveRawStrings specifies that when encoding a raw JSON string in a [Token] or [Value], pre-escaped sequences in a JSON string are preserved to the
jsontext/alias.go:280
↓ 6 callersMethodPreviousTokenOrValue
PreviousTokenOrValue returns the previously read token or value unless it has been invalidated by a call to PeekKind. If a token is just a delimiter,
jsontext/decode.go:290
↓ 6 callersMethodReplaceLastQuotedOffset
ReplaceLastQuotedOffset replaces the last name with the starting offset to the quoted name in some remote buffer. All offsets provided must be relativ
jsontext/state.go:593
↓ 6 callersMethodSkipValue
SkipValue is semantically equivalent to calling [Decoder.ReadValue] and discarding the result except that memory is not wasted trying to hold the enti
jsontext/decode.go:413
↓ 6 callersFunctionUnmarshalDecode
UnmarshalDecode deserializes a Go value from a [jsontext.Decoder] according to the provided unmarshal or decode options (while ignoring marshal or enc
alias.go:528
↓ 6 callersFunctionWithIndentPrefix
WithIndentPrefix specifies that the encoder should emit multiline output where each element in a JSON object or array begins on a new, indented line b
jsontext/alias.go:385
↓ 6 callersFunctionaddr
(v T)
v1/diff_test.go:250
↓ 6 callersMethodappendNumber
appendNumber appends a JSON number to dst and returns it. It panics if t is not a JSON number.
jsontext/token.go:324
↓ 6 callersMethodappendString
appendString appends a JSON string to dst and returns it. It panics if t is not a JSON string.
jsontext/token.go:257
↓ 6 callersFunctionimplementsAny
implementsAny is like t.Implements(ifaceType) for a list of interfaces, but checks whether either t or reflect.PointerTo(t) implements the interface.
arshal_methods.go:356
↓ 6 callersMethodlength
length reports the number of names in the namespace.
jsontext/state.go:741
↓ 6 callersFunctionmakeFlags
(f ...jsonflags.Bools)
internal/jsonopts/options_test.go:19
↓ 6 callersFunctionnewUnmarshalErrorAfterWithSkipping
newUnmarshalErrorAfterWithSkipping is like [newUnmarshalErrorAfter], but automatically skips the remainder of the current value if [jsonflags.ReportEr
errors.go:195
↓ 6 callersMethodpop
pop ascends out of a nested JSON object.
jsontext/state.go:622
↓ 6 callersMethodpush
push descends into a nested JSON object.
jsontext/state.go:586
↓ 5 callersFunctionBool
Bool constructs a Token representing a JSON boolean.
jsontext/alias.go:485
↓ 5 callersFunctionCompact
Compact appends to dst the JSON-encoded src with insignificant space characters elided.
v1/alias.go:502
↓ 5 callersMethodInputOffset
InputOffset returns the current input byte offset. It gives the location of the next byte immediately after the most recently returned token or value.
jsontext/decode.go:1135
↓ 5 callersMethodInt
Int returns the signed integer value for a JSON number. It reports an error that matches [strconv.ErrSyntax] according to [errors.Is] if the JSON num
jsontext/token.go:452
↓ 5 callersMethodIsZero
()
v1/encode_test.go:93
↓ 5 callersMethodJoin
(srcs ...Options)
internal/jsonopts/options.go:127
↓ 5 callersMethodLastToken
LastToken returns the last token in the pointer. The last token of an empty p is an empty string.
jsontext/state.go:127
↓ 5 callersFunctionMarshalEncode
MarshalEncode serializes a Go value into an [jsontext.Encoder] according to the provided marshal or encode options (while ignoring unmarshal or decode
alias.go:368
↓ 5 callersFunctionMarshalIndent
MarshalIndent is like [Marshal] but applies [Indent] to format the output. Each JSON element in the output will begin on a new line beginning with pre
v1/alias.go:463
↓ 5 callersFunctionMatchCaseInsensitiveNames
MatchCaseInsensitiveNames specifies that JSON object members are matched against Go struct fields using a case-insensitive match of the name. If a nam
alias.go:915
↓ 5 callersMethodOutputOffset
OutputOffset returns the current output byte offset. It gives the location of the next byte immediately after the most recently written token or value
jsontext/encode.go:900
↓ 5 callersMethodString
String returns the literal text of the number.
v1/decode.go:197
↓ 5 callersFunctionTrimSuffixWhitespace
TrimSuffixWhitespace trims JSON whitespace from the end of b.
internal/jsonwire/wire.go:21
↓ 5 callersMethodUint
Uint returns the unsigned integer value for a JSON number. It reports an error that matches [strconv.ErrSyntax] if the JSON number does not match the
jsontext/token.go:535
↓ 5 callersMethodUnwrap
()
errors.go:443
↓ 5 callersFunctionappendFracBase10
appendFracBase10 appends the fraction of n/max10, where max10 is a power-of-10 that is larger than n.
arshal_time.go:708
↓ 5 callersMethodcopyQuotedBuffer
copyQuotedBuffer copies names from the remote buffer into the local names buffer so that there are no more offset references into the remote buffer. T
jsontext/state.go:630
↓ 5 callersMethodfetch
fetch is called to ensure that at least b bits are available. It reports false if this can't be done, in which case only rbr.cnt bits are available.
internal/zstd/bits.go:113
↓ 5 callersMethodfetch
fetch reads at least 1 byte from the underlying io.Reader. It returns io.ErrUnexpectedEOF if zero bytes were read and io.EOF was seen.
jsontext/decode.go:175
← previousnext →101–200 of 1,017, ranked by callers