MCPcopy Create free account

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

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

↓ 3 callersFunctioninitBig
()
v1/scanner_test.go:234
↓ 3 callersMethodinvalidatePreviousRead
invalid starting character for JSON grammar invalidatePreviousRead invalidates buffers returned by Peek and Read calls so that the first byte is an in
jsontext/decode.go:261
↓ 3 callersFunctionisSemanticError
(err error)
errors.go:48
↓ 3 callersFunctionlen64
(in Bytes)
arshal_default.go:85
↓ 3 callersFunctionmarshalEncode
(out *jsontext.Encoder, in any, mo *jsonopts.Struct)
arshal.go:231
↓ 3 callersFunctionmustDo
(err error)
alias_gen.go:276
↓ 3 callersFunctionmustGet
(v T, err error)
internal/jsontest/testdata.go:44
↓ 3 callersMethodneedImplicitComma
needImplicitComma reports whether a comma should occur next, which always occurs after a value in a JSON object or array before the next value (or nam
jsontext/state.go:493
↓ 3 callersMethodneedObjectValue
needObjectValue reports whether the next token should be an object value. This method is used by [wrapSyntacticError].
jsontext/state.go:72
↓ 3 callersFunctionparseDec2
parseDec2 parses b as an unsigned, base-10, 2-digit number. The result is undefined if digits are not base-10.
arshal_time.go:790
↓ 3 callersFunctionparsePaddedBase10
parsePaddedBase10 parses b as the zero-padded encoding of n, where max10 is a power-of-10 that is larger than n. Truncated suffix is treated as implic
arshal_time.go:745
↓ 3 callersFunctionputBufferedDecoder
(d *Decoder)
jsontext/pools.go:137
↓ 3 callersFunctionputStrings
(s *stringSlice)
arshal.go:563
↓ 3 callersMethodrandN
(n int)
jsontext/coder_test.go:851
↓ 3 callersMethodreformatValue
reformatValue parses a JSON value from the start of src and appends it to the end of dst, reformatting whitespace and strings as needed. It returns th
jsontext/encode.go:668
↓ 3 callersMethodremoveLast
removeLast removes the last name in the namespace.
jsontext/state.go:817
↓ 3 callersMethodsetSeqTable
setSeqTable uses the Compression_Mode in mode to set up r.seqTables and r.seqTableBits for kind. We store these in the Reader because one of the modes
internal/zstd/block.go:174
↓ 3 callersMethodunflushedBuffer
()
jsontext/encode.go:227
↓ 3 callersFunctionunmarshalDecode
(in *jsontext.Decoder, out any, uo *jsonopts.Struct, last bool)
arshal.go:453
↓ 3 callersFunctionunmarshalValueAny
unmarshalValueAny unmarshals a JSON value as a Go any. This assumes that there are no special formatting directives for any possible nested value. Dup
arshal_any.go:64
↓ 2 callersMethodAppendToken
AppendToken appends a token to the end of p and returns the full pointer.
jsontext/state.go:133
↓ 2 callersMethodAtEOF
AtEOF reports whether the decoder is at EOF.
jsontext/decode.go:800
↓ 2 callersFunctionConsumeNumberResumable
ConsumeNumberResumable is identical to ConsumeNumber but supports resuming from a previous call that returned io.ErrUnexpectedEOF.
internal/jsonwire/decode.go:472
↓ 2 callersFunctionConsumeStringResumable
ConsumeStringResumable is identical to [ConsumeString] but supports resuming from a previous call that returned io.ErrUnexpectedEOF.
internal/jsonwire/decode.go:123
↓ 2 callersFunctionEscapeForJS
EscapeForJS specifies that U+2028 and U+2029 characters within JSON strings should be escaped as a hexadecimal Unicode codepoint (e.g., \u2028) so tha
jsontext/alias.go:267
↓ 2 callersMethodExport
Export exposes internal functionality from "jsontext" to "json". This cannot be dynamically called by other packages since they cannot obtain a refere
jsontext/export.go:38
↓ 2 callersMethodFloat64
Float64 returns the number as a float64.
v1/decode.go:200
↓ 2 callersFunctionFormatNilMapAsNull
FormatNilMapAsNull specifies that a nil Go map should marshal as a JSON null instead of the default representation as an empty JSON object. This only
alias.go:878
↓ 2 callersFunctionFormatNilSliceAsNull
FormatNilSliceAsNull specifies that a nil Go slice should marshal as a JSON null instead of the default representation as an empty JSON array (or an e
alias.go:870
↓ 2 callersMethodGetBufferedEncoder
(o ...Options)
jsontext/export.go:60
↓ 2 callersMethodInitializeMultiline
InitializeMultiline sets default options implied by Multiline.
internal/jsonopts/options.go:184
↓ 2 callersMethodInvalidateDisabledNamespaces
InvalidateDisabledNamespaces marks all disabled namespaces as invalid. For efficiency, Marshal and Unmarshal may disable namespaces since there are m
jsontext/state.go:421
↓ 2 callersFunctionMarshalFunc
MarshalFunc constructs a type-specific marshaler that specifies how to marshal values of type T. T can be any type except a named pointer. The functio
arshal_funcs.go:170
↓ 2 callersMethodMarshalText
()
v1/decode_test.go:151
↓ 2 callersFunctionNeedEscape
NeedEscape reports whether src needs escaping of any characters. It conservatively assumes EscapeForHTML and EscapeForJS. It reports true for inputs w
internal/jsonwire/encode.go:35
↓ 2 callersFunctionOmitZeroStructFields
OmitZeroStructFields specifies that a Go struct should marshal in such a way that all struct fields that are zero are omitted from the marshaled outpu
alias.go:890
↓ 2 callersMethodPutBufferedEncoder
(e *Encoder)
jsontext/export.go:63
↓ 2 callersFunctionReformatNumber
ReformatNumber consumes a JSON number from src and appends it to dst, canonicalizing it if specified. It returns the appended output and the number of
internal/jsonwire/encode.go:241
↓ 2 callersFunctionReportErrorsWithLegacySemantics
ReportErrorsWithLegacySemantics specifies that Marshal and Unmarshal should report errors with legacy semantics: - When marshaling or unmarshaling, t
v1/alias.go:782
↓ 2 callersMethodSkipUntil
SkipUntil skips all tokens until the state machine is at or past the specified depth and length.
jsontext/decode.go:456
↓ 2 callersMethodStackDepth
StackDepth returns the depth of the state machine for written JSON data. Each level on the stack represents a nested JSON object or array. It is incre
jsontext/encode.go:956
↓ 2 callersMethodStackIndex
StackIndex returns information about the specified stack level. It must be a number between 0 and [Encoder.StackDepth], inclusive. For each level, it
jsontext/encode.go:973
↓ 2 callersFunctionTrimSuffixString
TrimSuffixString trims a valid JSON string at the end of b. The behavior is undefined if there is not a valid JSON string present.
internal/jsonwire/wire.go:32
↓ 2 callersFunctionUnmarshalFromFunc
UnmarshalFromFunc constructs a type-specific unmarshaler that specifies how to unmarshal values of type T. T must be an unnamed pointer or an interfac
arshal_funcs.go:297
↓ 2 callersMethodUnmarshalText
(b []byte)
v1/decode_test.go:157
↓ 2 callersMethodUnwrap
Unwrap returns the underlying error.
v1/encode.go:261
↓ 2 callersMethodUseNumber
UseNumber causes the Decoder to unmarshal a number into an interface value as a [Number] instead of as a float64.
v1/stream.go:54
↓ 2 callersFunctionappendEscapedASCII
(dst []byte, c byte)
internal/jsonwire/encode.go:112
↓ 2 callersFunctionappendEscapedUnicode
(dst []byte, r rune)
internal/jsonwire/encode.go:132
↓ 2 callersFunctionappendIndent
(dst, src []byte, prefix, indent string)
v1/indent.go:91
↓ 2 callersMethodappendMarshal
(b []byte)
arshal_time.go:255
↓ 2 callersFunctionappendPaddedBase10
appendPaddedBase10 appends a zero-padded encoding of n, where max10 is a power-of-10 that is larger than n.
arshal_time.go:729
↓ 2 callersMethodappendStackPointer
appendStackPointer appends a JSON Pointer (RFC 6901) to the current value. - If where is -1, then it points to the previously processed token. - If
jsontext/state.go:181
↓ 2 callersFunctionappendTimeUnix
appendTimeUnix appends t formatted as a decimal fractional number, where pow10 is a power-of-10 used to scale up the number.
arshal_time.go:642
↓ 2 callersFunctionbytesCutByte
bytesCutByte is similar to bytes.Cut(b, []byte{c}), except c may optionally be included as part of the suffix.
arshal_time.go:778
↓ 2 callersFunctioncastableTo
castableTo checks whether values of type "from" can be casted to type "to". Nil pointer or interface "from" values are never considered castable. Thi
arshal_funcs.go:384
↓ 2 callersMethodcheckEOF
(pos int)
jsontext/decode.go:809
↓ 2 callersFunctioncheckValid
(data []byte)
v1/scanner.go:27
↓ 2 callersMethodclearLast
clearLast removes any name in the last JSON object. It is semantically equivalent to ns.push followed by ns.pop.
jsontext/state.go:617
↓ 2 callersMethodconsumeNumber
consumeNumber consumes a single JSON number starting at d.buf[pos:]. It returns the new position in d.buf immediately after the number.
jsontext/decode.go:945
↓ 2 callersMethodensureCopiedBuffer
()
jsontext/state.go:670
↓ 2 callersFunctionequalFold
(x, y []byte)
fold_test.go:69
↓ 2 callersFunctionf64toi64
(f64 float64)
jsontext/token.go:510
↓ 2 callersFunctionf64tou64
(f64 float64)
jsontext/token.go:589
↓ 2 callersMethodfloat
(bits int)
jsontext/token.go:391
↓ 2 callersFunctiongenString
(stddev float64)
v1/scanner_test.go:266
↓ 2 callersMethodgetUnquoted
getUnquoted retrieves the ith unquoted name in the namespace.
jsontext/state.go:746
↓ 2 callersMethodinsert
(name []byte, quoted bool)
jsontext/state.go:771
↓ 2 callersMethodlookupByFoldedName
lookupByFoldedName looks up name by a case-insensitive match that also ignores the presence of dashes and underscores.
fields.go:63
↓ 2 callersFunctionmakeBytesArshaler
(t reflect.Type, fncs *arshaler)
arshal_default.go:325
↓ 2 callersFunctionmakeStructFields
(root reflect.Type)
fields.go:80
↓ 2 callersFunctionmapKeyWithUniqueRepresentation
mapKeyWithUniqueRepresentation reports whether all possible values of k marshal to a different JSON value, and whether all possible JSON values that c
arshal_default.go:1085
↓ 2 callersMethodmatchFoldedName
matchFoldedName matches a case-insensitive name depending on the options. It assumes that foldName(f.name) == foldName(name). Case-insensitive matchi
fields.go:380
↓ 2 callersFunctionmayAppendDurationSign
mayAppendDurationSign appends a negative sign if n is negative.
arshal_time.go:623
↓ 2 callersFunctionmayApplyDurationSign
mayApplyDurationSign inverts n if neg is specified.
arshal_time.go:632
↓ 2 callersMethodmayError
mayError may return a non-nil error.
jsontext/coder_test.go:844
↓ 2 callersMethodmayTruncate
mayTruncate may return a value between [0, n].
jsontext/coder_test.go:833
↓ 2 callersFunctionmustReorderObjects
mustReorderObjects reorders in-place all object members in a JSON value, which must be valid otherwise it panics.
jsontext/value.go:304
↓ 2 callersMethodneedImplicitColon
needImplicitColon reports whether a colon should occur next, which always occurs after JSON object names.
jsontext/state.go:480
↓ 2 callersMethodneedObjectValue
needObjectValue reports whether the next token must be a JSON value, which is necessary after every JSON object name.
jsontext/state.go:486
↓ 2 callersFunctionnegateSecNano
negateSecNano negates a Unix timestamp, where nsec must be within [0, 1e9).
arshal_time.go:698
↓ 2 callersFunctionnewTypedArshalers
(as ...*typedArshalers[Coder])
arshal_funcs.go:100
↓ 2 callersFunctionnlines
(s string, n int)
v1/stream_test.go:275
↓ 2 callersFunctionparseFieldOptions
parseFieldOptions parses the `json` tag in a Go struct field as a structured set of options configuring parameters such as the JSON member name and ot
fields.go:410
↓ 2 callersFunctionparseFracBase10
parseFracBase10 parses the fraction of n/max10, where max10 is a power-of-10 that is larger than n.
arshal_time.go:717
↓ 2 callersFunctionparseTimeUnix
parseTimeUnix parses t formatted as a decimal fractional number, where pow10 is a power-of-10 used to scale down the number.
arshal_time.go:664
↓ 2 callersMethodpreviousOffsetEnd
()
jsontext/encode.go:226
↓ 2 callersMethodpreviousOffsetEnd
()
jsontext/decode.go:282
↓ 2 callersMethodreadFSE
readFSE reads an FSE table from data starting at off. maxSym is the maximum symbol value. maxBits is the maximum number of bits permitted for symbols
internal/zstd/fse.go:24
↓ 2 callersMethodrefillIfNeeded
refillIfNeeded reads the next block if necessary.
internal/zstd/zstd.go:145
↓ 2 callersMethodreindex
reindex recomputes index to avoid bounds check during runtime. During the construction of each [structField] in [makeStructFields], the index field i
fields.go:45
↓ 2 callersMethodreset
reset clears stored data and configures window size.
internal/zstd/window.go:21
↓ 2 callersFunctionrunAllSlowStreamingDecode
(tb testing.TB)
bench_test.go:560
↓ 2 callersFunctionrunAllTestdata
(tb testing.TB)
bench_test.go:401
↓ 2 callersFunctionrunMarshal
(tb testing.TB)
bench_test.go:357
↓ 2 callersFunctionrunUnmarshal
(tb testing.TB)
bench_test.go:323
↓ 2 callersFunctionrunValue
(tb testing.TB)
bench_test.go:591
↓ 2 callersMethodset
(i uint)
arshal_default.go:2005
↓ 2 callersMethodsetBufferSize
setBufferSize sets the decompressed buffer size. When this is called the buffer is empty.
internal/zstd/zstd.go:463
↓ 2 callersFunctionsliceLen
(v reflect.Value)
arshal_default.go:78
← previousnext →301–400 of 1,017, ranked by callers