MCPcopy Create free account

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

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

↓ 2 callersFunctiontrim
(b []byte)
v1/scanner_test.go:226
↓ 2 callersFunctiontrimRight
(out *bytes.Buffer, cutset string)
alias_gen.go:294
↓ 2 callersFunctionunescapePointerToken
(token string)
jsontext/state.go:155
↓ 2 callersFunctionwrapWithArrayIndex
wrapWithArrayIndex wraps err with a JSON array index access.
jsontext/errors.go:194
↓ 1 callersMethodAppendStackPointer
(b []byte, where int)
jsontext/decode.go:1215
↓ 1 callersMethodBuffered
Buffered returns a reader of the data remaining in the unread buffer, which may contain zero or more bytes. This is the data already consumed from the
v1/stream.go:107
↓ 1 callersFunctionChangedWhitespace
ChangedWhitespace reports whether whitespace values have changed.
internal/jsonopts/options.go:198
↓ 1 callersMethodCheckNextValue
CheckNextValue checks whether the next value is syntactically valid, but does not advance the read offset. If last, it verifies that the stream cleanl
jsontext/decode.go:782
↓ 1 callersMethodDisallowUnknownFields
DisallowUnknownFields causes the Decoder to return an error when the destination is a struct and the input contains object keys which do not match any
v1/stream.go:63
↓ 1 callersMethodError
()
v1/decode.go:132
↓ 1 callersFunctionExperimentalSupportFormatTag
ExperimentalSupportFormatTag enables support for the `format` tag. WARNING: This is an experimental feature and will be removed in the future as eith
options_format.go:116
↓ 1 callersMethodExperimentalSupportFormatTag
()
internal/jsonopts/options.go:23
↓ 1 callersFunctionFloat
Float constructs a Token representing a JSON number as a 64-bit floating-point number formatted according to ECMA-262, 10th edition, section 7.1.12.1
jsontext/token.go:175
↓ 1 callersMethodFloat32
Float32 returns the floating-point value for a JSON number parsed according to 32 bits of precision. If the JSON number is outside the representable
jsontext/token.go:369
↓ 1 callersMethodFormat
Format formats the raw JSON value in place. By default (if no options are specified), it validates according to RFC 7493 and produces the minimal JSO
jsontext/value.go:130
↓ 1 callersFunctionGetOption
(opts Options, setter func(T) Options)
internal/jsonopts/options.go:74
↓ 1 callersMethodGetStreamingDecoder
(r io.Reader, o ...Options)
jsontext/export.go:81
↓ 1 callersMethodGetStreamingEncoder
(w io.Writer, o ...Options)
jsontext/export.go:67
↓ 1 callersFunctionHTMLEscape
HTMLEscape appends to dst the JSON-encoded src with <, >, &, U+2028 and U+2029 characters inside string literals changed to \u003c, \u003e, \u0026, \u
v1/alias.go:496
↓ 1 callersMethodInt64
Int64 returns the number as an int64.
v1/decode.go:205
↓ 1 callersMethodIsCanonical
()
internal/jsonwire/decode.go:30
↓ 1 callersFunctionJoinMarshalers
JoinMarshalers constructs a flattened list of marshal functions. If multiple functions in the list are applicable for a value of a given type, then th
arshal_funcs.go:44
↓ 1 callersFunctionMarshal
Marshal returns the JSON encoding of v. Marshal traverses the value v recursively. The input value is encoded as JSON according the following rules:
v1/encode.go:184
↓ 1 callersMethodMarshalJSONTo
(*jsontext.Encoder)
arshal_methods.go:75
↓ 1 callersMethodMarshalText
()
v1/encode_test.go:531
↓ 1 callersFunctionMarshalToFunc
MarshalToFunc constructs a type-specific marshaler that specifies how to marshal values of type T. T can be any type except a named pointer. The funct
arshal_funcs.go:213
↓ 1 callersFunctionNewReader
NewReader creates a new Reader that decompresses data from the given reader.
internal/zstd/zstd.go:88
↓ 1 callersMethodPutStreamingDecoder
(d *Decoder)
jsontext/export.go:84
↓ 1 callersMethodPutStreamingEncoder
(e *Encoder)
jsontext/export.go:70
↓ 1 callersMethodRead
Read implements [io.Reader].
internal/zstd/zstd.go:125
↓ 1 callersMethodRead
(b []byte)
jsontext/coder_test.go:814
↓ 1 callersMethodReadValue
(flags *jsonwire.ValueFlags)
jsontext/decode.go:680
↓ 1 callersMethodReset
Reset discards the current state and starts reading a new stream from r. This permits reusing a Reader rather than allocating a new one.
internal/zstd/zstd.go:96
↓ 1 callersMethodSetEscapeHTML
SetEscapeHTML specifies whether problematic HTML characters should be escaped inside JSON quoted strings. The default behavior is to escape &, <, and
v1/stream.go:181
↓ 1 callersMethodSkipValueRemainder
SkipValueRemainder skips the remainder of a value after reading a '{' or '[' token.
jsontext/decode.go:443
↓ 1 callersMethodStackDepth
StackDepth returns the depth of the state machine for read JSON data. Each level on the stack represents a nested JSON object or array. It is incremen
jsontext/decode.go:1181
↓ 1 callersMethodStackIndex
StackIndex returns information about the specified stack level. It must be a number between 0 and [Decoder.StackDepth], inclusive. For each level, it
jsontext/decode.go:1198
↓ 1 callersMethodString
String returns the string formatting of v.
jsontext/value.go:74
↓ 1 callersMethodTokens
TODO: Add Pointer.AppendTokens, but should this take in a ...string or an iter.Seq[string]? Tokens returns an iterator over the reference tokens in th
jsontext/state.go:142
↓ 1 callersFunctionUnmarshalFunc
UnmarshalFunc constructs a type-specific unmarshaler that specifies how to unmarshal values of type T. T must be an unnamed pointer or an interface ty
arshal_funcs.go:260
↓ 1 callersMethodUnmarshalJSONFrom
(*jsontext.Decoder)
arshal_methods.go:121
↓ 1 callersMethodUnwrap
()
jsontext/errors.go:29
↓ 1 callersMethodUnwriteEmptyObjectMember
UnwriteEmptyObjectMember unwrites the last object member if it is empty and reports whether it performed an unwrite operation.
jsontext/encode.go:253
↓ 1 callersMethodUnwriteOnlyObjectMemberName
UnwriteOnlyObjectMemberName unwrites the only object member name and returns the unquoted name.
jsontext/encode.go:312
↓ 1 callersFunctionValid
Valid reports whether data is a valid JSON encoding.
v1/alias.go:827
↓ 1 callersMethodappend
append is a thin wrapper over the other append, pop, or push methods based on the token kind.
jsontext/state_test.go:249
↓ 1 callersFunctionappendDurationBase10
appendDurationBase10 appends d formatted as a decimal fractional number, where pow10 is a power-of-10 used to scale down the number.
arshal_time.go:436
↓ 1 callersFunctionappendDurationISO8601
appendDurationISO8601 appends an ISO 8601 duration with a restricted grammar, where leading and trailing zeroes and zero-value designators are omitted
arshal_time.go:466
↓ 1 callersFunctionappendFoldedName
(out, in []byte)
fold.go:23
↓ 1 callersFunctionappendHTMLEscape
(dst, src []byte)
v1/indent.go:26
↓ 1 callersMethodappendMarshal
(b []byte)
arshal_time.go:368
↓ 1 callersMethodappendNumber
appendNumber appends a JSON number as the next token in the sequence. If an error is returned, the state is not mutated.
jsontext/state.go:296
↓ 1 callersMethodappendPointer
appendPointer appends the path encoded in e to the end of pointer.
jsontext/errors.go:204
↓ 1 callersMethodappendString
appendString appends a JSON string as the next token in the sequence. If an error is returned, the state is not mutated.
jsontext/state.go:284
↓ 1 callersMethodappendTo
appendTo appends stored bytes between from and to indices to the buf. Index from must be less or equal to index to and to must be less or equal to w.l
internal/zstd/window.go:73
↓ 1 callersMethodavoidFlush
avoidFlush indicates whether to avoid flushing to ensure there is always enough in the buffer to unwrite the last object member if it were empty.
jsontext/encode.go:231
↓ 1 callersMethodbackup
backup steps back to the last byte we used.
internal/zstd/bits.go:58
↓ 1 callersFunctionboolsCompare
boolsCompare compares x and y, ordering false before true.
fields.go:647
↓ 1 callersMethodbuildFSE
buildFSE builds an FSE decoding table from a list of probabilities. The probabilities are in norm. next is scratch space. The number of bits in the ta
internal/zstd/fse.go:156
↓ 1 callersMethodcompressedBlock
compressedBlock decompresses a compressed block, storing the decompressed data in r.buffer. The blockSize argument is the compressed size. RFC 3.1.1.3
internal/zstd/block.go:17
↓ 1 callersMethodconsumeArray
consumeArray consumes a single JSON array starting at d.buf[pos:]. It returns the new position in d.buf immediately after the array.
jsontext/decode.go:1074
↓ 1 callersMethodconsumeObject
consumeObject consumes a single JSON object starting at d.buf[pos:]. It returns the new position in d.buf immediately after the object.
jsontext/decode.go:971
↓ 1 callersMethodcopyFromWindow
Copy match bytes from the decoded output, or the window, at offset.
internal/zstd/block.go:386
↓ 1 callersMethoddigest
digest returns the final hash value.
internal/zstd/xxhash.go:85
↓ 1 callersMethodexecSeqs
execSeqs reads and executes the sequences. RFC 3.1.1.3.2.1.2.
internal/zstd/block.go:249
↓ 1 callersFunctiongenArray
(n int)
v1/scanner_test.go:279
↓ 1 callersFunctiongenMap
(n int)
v1/scanner_test.go:294
↓ 1 callersFunctiongenerateAliases
(targetPkgPath, workingDir string)
alias_gen.go:52
↓ 1 callersFunctiongetObjectMembers
()
jsontext/value.go:290
↓ 1 callersFunctiongetStreamingDecoder
(r io.Reader, opts ...Options)
jsontext/pools.go:142
↓ 1 callersFunctiongetStreamingEncoder
(w io.Writer, opts ...Options)
jsontext/pools.go:90
↓ 1 callersMethodgetUnquoted
getUnquoted retrieves the ith unquoted name in the stack. It returns an empty string if the last object is empty. Invariant: Must call copyQuotedBuff
jsontext/state.go:573
↓ 1 callersMethodhasCustomFormat
()
arshal_time.go:364
↓ 1 callersMethodinitSeqs
initSeqs reads the Sequences_Section_Header and sets up the FSE tables used to read the sequence codes. It returns the number of sequences and the new
internal/zstd/block.go:111
↓ 1 callersMethodinvalidateNamespace
invalidateNamespace marks the JSON object namespace as being invalid.
jsontext/state.go:523
↓ 1 callersFunctionisAnyType
isAnyType reports whether t is equivalent to the any interface type.
arshal_default.go:1962
↓ 1 callersFunctionisLegacyEmpty
isLegacyEmpty reports whether a value is empty according to the v1 definition.
arshal_default.go:1446
↓ 1 callersMethodlastUnquoted
lastUnquoted retrieves the last name in the namespace.
jsontext/state.go:755
↓ 1 callersMethodlen
len returns the number of stored bytes.
internal/zstd/window.go:32
↓ 1 callersFunctionmakeArrayArshaler
(t reflect.Type)
arshal_default.go:1612
↓ 1 callersMethodmakeBitReader
makeBitReader makes a bit reader starting at off.
internal/zstd/bits.go:26
↓ 1 callersFunctionmakeBoolArshaler
(t reflect.Type)
arshal_default.go:126
↓ 1 callersFunctionmakeDefaultArshaler
(t reflect.Type)
arshal_default.go:89
↓ 1 callersMethodmakeError
makeError returns an error at the current offset wrapping a string.
internal/zstd/bits.go:66
↓ 1 callersFunctionmakeFloatArshaler
(t reflect.Type)
arshal_default.go:656
↓ 1 callersFunctionmakeIntArshaler
(t reflect.Type)
arshal_default.go:467
↓ 1 callersFunctionmakeInterfaceArshaler
(t reflect.Type)
arshal_default.go:1795
↓ 1 callersFunctionmakeInvalidArshaler
(t reflect.Type)
arshal_default.go:1970
↓ 1 callersFunctionmakeMapArshaler
(t reflect.Type)
arshal_default.go:774
↓ 1 callersFunctionmakeMethodArshaler
(fncs *arshaler, t reflect.Type)
arshal_methods.go:124
↓ 1 callersFunctionmakePointerArshaler
(t reflect.Type)
arshal_default.go:1715
↓ 1 callersFunctionmakeSliceArshaler
(t reflect.Type)
arshal_default.go:1465
↓ 1 callersFunctionmakeStringArshaler
(t reflect.Type)
arshal_default.go:211
↓ 1 callersFunctionmakeStructArshaler
(t reflect.Type)
arshal_default.go:1105
↓ 1 callersFunctionmakeTimeArshaler
(fncs *arshaler, t reflect.Type)
arshal_time.go:33
↓ 1 callersFunctionmakeUintArshaler
(t reflect.Type)
arshal_default.go:566
↓ 1 callersFunctionmarshalArrayAny
marshalArrayAny marshals a Go []any as a JSON array (or as a JSON null if nil and [jsonflags.FormatNilSliceAsNull]).
arshal_any.go:223
↓ 1 callersFunctionmarshalEmbeddedFallbackAll
marshalEmbeddedFallbackAll marshals all the members in an embedded fallback.
arshal_embedded.go:40
↓ 1 callersFunctionmarshalObjectAny
marshalObjectAny marshals a Go map[string]any as a JSON object (or as a JSON null if nil and [jsonflags.FormatNilMapAsNull]).
arshal_any.go:107
↓ 1 callersFunctionmustDecodeTokens
(t testing.TB, data []byte)
bench_test.go:456
← previousnext →401–500 of 1,017, ranked by callers