Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/go-json-experiment/json
/ functions
Functions
1,017 in github.com/go-json-experiment/json
⨍
Functions
1,017
◇
Types & classes
442
↓ 2 callers
Function
trim
(b []byte)
v1/scanner_test.go:226
↓ 2 callers
Function
trimRight
(out *bytes.Buffer, cutset string)
alias_gen.go:294
↓ 2 callers
Function
unescapePointerToken
(token string)
jsontext/state.go:155
↓ 2 callers
Function
wrapWithArrayIndex
wrapWithArrayIndex wraps err with a JSON array index access.
jsontext/errors.go:194
↓ 1 callers
Method
AppendStackPointer
(b []byte, where int)
jsontext/decode.go:1215
↓ 1 callers
Method
Buffered
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 callers
Function
ChangedWhitespace
ChangedWhitespace reports whether whitespace values have changed.
internal/jsonopts/options.go:198
↓ 1 callers
Method
CheckNextValue
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 callers
Method
DisallowUnknownFields
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 callers
Method
Error
()
v1/decode.go:132
↓ 1 callers
Function
ExperimentalSupportFormatTag
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 callers
Method
ExperimentalSupportFormatTag
()
internal/jsonopts/options.go:23
↓ 1 callers
Function
Float
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 callers
Method
Float32
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 callers
Method
Format
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 callers
Function
GetOption
(opts Options, setter func(T) Options)
internal/jsonopts/options.go:74
↓ 1 callers
Method
GetStreamingDecoder
(r io.Reader, o ...Options)
jsontext/export.go:81
↓ 1 callers
Method
GetStreamingEncoder
(w io.Writer, o ...Options)
jsontext/export.go:67
↓ 1 callers
Function
HTMLEscape
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 callers
Method
Int64
Int64 returns the number as an int64.
v1/decode.go:205
↓ 1 callers
Method
IsCanonical
()
internal/jsonwire/decode.go:30
↓ 1 callers
Function
JoinMarshalers
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 callers
Function
Marshal
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 callers
Method
MarshalJSONTo
(*jsontext.Encoder)
arshal_methods.go:75
↓ 1 callers
Method
MarshalText
()
v1/encode_test.go:531
↓ 1 callers
Function
MarshalToFunc
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 callers
Function
NewReader
NewReader creates a new Reader that decompresses data from the given reader.
internal/zstd/zstd.go:88
↓ 1 callers
Method
PutStreamingDecoder
(d *Decoder)
jsontext/export.go:84
↓ 1 callers
Method
PutStreamingEncoder
(e *Encoder)
jsontext/export.go:70
↓ 1 callers
Method
Read
Read implements [io.Reader].
internal/zstd/zstd.go:125
↓ 1 callers
Method
Read
(b []byte)
jsontext/coder_test.go:814
↓ 1 callers
Method
ReadValue
(flags *jsonwire.ValueFlags)
jsontext/decode.go:680
↓ 1 callers
Method
Reset
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 callers
Method
SetEscapeHTML
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 callers
Method
SkipValueRemainder
SkipValueRemainder skips the remainder of a value after reading a '{' or '[' token.
jsontext/decode.go:443
↓ 1 callers
Method
StackDepth
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 callers
Method
StackIndex
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 callers
Method
String
String returns the string formatting of v.
jsontext/value.go:74
↓ 1 callers
Method
Tokens
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 callers
Function
UnmarshalFunc
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 callers
Method
UnmarshalJSONFrom
(*jsontext.Decoder)
arshal_methods.go:121
↓ 1 callers
Method
Unwrap
()
jsontext/errors.go:29
↓ 1 callers
Method
UnwriteEmptyObjectMember
UnwriteEmptyObjectMember unwrites the last object member if it is empty and reports whether it performed an unwrite operation.
jsontext/encode.go:253
↓ 1 callers
Method
UnwriteOnlyObjectMemberName
UnwriteOnlyObjectMemberName unwrites the only object member name and returns the unquoted name.
jsontext/encode.go:312
↓ 1 callers
Function
Valid
Valid reports whether data is a valid JSON encoding.
v1/alias.go:827
↓ 1 callers
Method
append
append is a thin wrapper over the other append, pop, or push methods based on the token kind.
jsontext/state_test.go:249
↓ 1 callers
Function
appendDurationBase10
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 callers
Function
appendDurationISO8601
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 callers
Function
appendFoldedName
(out, in []byte)
fold.go:23
↓ 1 callers
Function
appendHTMLEscape
(dst, src []byte)
v1/indent.go:26
↓ 1 callers
Method
appendMarshal
(b []byte)
arshal_time.go:368
↓ 1 callers
Method
appendNumber
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 callers
Method
appendPointer
appendPointer appends the path encoded in e to the end of pointer.
jsontext/errors.go:204
↓ 1 callers
Method
appendString
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 callers
Method
appendTo
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 callers
Method
avoidFlush
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 callers
Method
backup
backup steps back to the last byte we used.
internal/zstd/bits.go:58
↓ 1 callers
Function
boolsCompare
boolsCompare compares x and y, ordering false before true.
fields.go:647
↓ 1 callers
Method
buildFSE
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 callers
Method
compressedBlock
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 callers
Method
consumeArray
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 callers
Method
consumeObject
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 callers
Method
copyFromWindow
Copy match bytes from the decoded output, or the window, at offset.
internal/zstd/block.go:386
↓ 1 callers
Method
digest
digest returns the final hash value.
internal/zstd/xxhash.go:85
↓ 1 callers
Method
execSeqs
execSeqs reads and executes the sequences. RFC 3.1.1.3.2.1.2.
internal/zstd/block.go:249
↓ 1 callers
Function
genArray
(n int)
v1/scanner_test.go:279
↓ 1 callers
Function
genMap
(n int)
v1/scanner_test.go:294
↓ 1 callers
Function
generateAliases
(targetPkgPath, workingDir string)
alias_gen.go:52
↓ 1 callers
Function
getObjectMembers
()
jsontext/value.go:290
↓ 1 callers
Function
getStreamingDecoder
(r io.Reader, opts ...Options)
jsontext/pools.go:142
↓ 1 callers
Function
getStreamingEncoder
(w io.Writer, opts ...Options)
jsontext/pools.go:90
↓ 1 callers
Method
getUnquoted
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 callers
Method
hasCustomFormat
()
arshal_time.go:364
↓ 1 callers
Method
initSeqs
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 callers
Method
invalidateNamespace
invalidateNamespace marks the JSON object namespace as being invalid.
jsontext/state.go:523
↓ 1 callers
Function
isAnyType
isAnyType reports whether t is equivalent to the any interface type.
arshal_default.go:1962
↓ 1 callers
Function
isLegacyEmpty
isLegacyEmpty reports whether a value is empty according to the v1 definition.
arshal_default.go:1446
↓ 1 callers
Method
lastUnquoted
lastUnquoted retrieves the last name in the namespace.
jsontext/state.go:755
↓ 1 callers
Method
len
len returns the number of stored bytes.
internal/zstd/window.go:32
↓ 1 callers
Function
makeArrayArshaler
(t reflect.Type)
arshal_default.go:1612
↓ 1 callers
Method
makeBitReader
makeBitReader makes a bit reader starting at off.
internal/zstd/bits.go:26
↓ 1 callers
Function
makeBoolArshaler
(t reflect.Type)
arshal_default.go:126
↓ 1 callers
Function
makeDefaultArshaler
(t reflect.Type)
arshal_default.go:89
↓ 1 callers
Method
makeError
makeError returns an error at the current offset wrapping a string.
internal/zstd/bits.go:66
↓ 1 callers
Function
makeFloatArshaler
(t reflect.Type)
arshal_default.go:656
↓ 1 callers
Function
makeIntArshaler
(t reflect.Type)
arshal_default.go:467
↓ 1 callers
Function
makeInterfaceArshaler
(t reflect.Type)
arshal_default.go:1795
↓ 1 callers
Function
makeInvalidArshaler
(t reflect.Type)
arshal_default.go:1970
↓ 1 callers
Function
makeMapArshaler
(t reflect.Type)
arshal_default.go:774
↓ 1 callers
Function
makeMethodArshaler
(fncs *arshaler, t reflect.Type)
arshal_methods.go:124
↓ 1 callers
Function
makePointerArshaler
(t reflect.Type)
arshal_default.go:1715
↓ 1 callers
Function
makeSliceArshaler
(t reflect.Type)
arshal_default.go:1465
↓ 1 callers
Function
makeStringArshaler
(t reflect.Type)
arshal_default.go:211
↓ 1 callers
Function
makeStructArshaler
(t reflect.Type)
arshal_default.go:1105
↓ 1 callers
Function
makeTimeArshaler
(fncs *arshaler, t reflect.Type)
arshal_time.go:33
↓ 1 callers
Function
makeUintArshaler
(t reflect.Type)
arshal_default.go:566
↓ 1 callers
Function
marshalArrayAny
marshalArrayAny marshals a Go []any as a JSON array (or as a JSON null if nil and [jsonflags.FormatNilSliceAsNull]).
arshal_any.go:223
↓ 1 callers
Function
marshalEmbeddedFallbackAll
marshalEmbeddedFallbackAll marshals all the members in an embedded fallback.
arshal_embedded.go:40
↓ 1 callers
Function
marshalObjectAny
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 callers
Function
mustDecodeTokens
(t testing.TB, data []byte)
bench_test.go:456
← previous
next →
401–500 of 1,017, ranked by callers