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
↓ 3 callers
Function
initBig
()
v1/scanner_test.go:234
↓ 3 callers
Method
invalidatePreviousRead
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 callers
Function
isSemanticError
(err error)
errors.go:48
↓ 3 callers
Function
len64
(in Bytes)
arshal_default.go:85
↓ 3 callers
Function
marshalEncode
(out *jsontext.Encoder, in any, mo *jsonopts.Struct)
arshal.go:231
↓ 3 callers
Function
mustDo
(err error)
alias_gen.go:276
↓ 3 callers
Function
mustGet
(v T, err error)
internal/jsontest/testdata.go:44
↓ 3 callers
Method
needImplicitComma
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 callers
Method
needObjectValue
needObjectValue reports whether the next token should be an object value. This method is used by [wrapSyntacticError].
jsontext/state.go:72
↓ 3 callers
Function
parseDec2
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 callers
Function
parsePaddedBase10
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 callers
Function
putBufferedDecoder
(d *Decoder)
jsontext/pools.go:137
↓ 3 callers
Function
putStrings
(s *stringSlice)
arshal.go:563
↓ 3 callers
Method
randN
(n int)
jsontext/coder_test.go:851
↓ 3 callers
Method
reformatValue
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 callers
Method
removeLast
removeLast removes the last name in the namespace.
jsontext/state.go:817
↓ 3 callers
Method
setSeqTable
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 callers
Method
unflushedBuffer
()
jsontext/encode.go:227
↓ 3 callers
Function
unmarshalDecode
(in *jsontext.Decoder, out any, uo *jsonopts.Struct, last bool)
arshal.go:453
↓ 3 callers
Function
unmarshalValueAny
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 callers
Method
AppendToken
AppendToken appends a token to the end of p and returns the full pointer.
jsontext/state.go:133
↓ 2 callers
Method
AtEOF
AtEOF reports whether the decoder is at EOF.
jsontext/decode.go:800
↓ 2 callers
Function
ConsumeNumberResumable
ConsumeNumberResumable is identical to ConsumeNumber but supports resuming from a previous call that returned io.ErrUnexpectedEOF.
internal/jsonwire/decode.go:472
↓ 2 callers
Function
ConsumeStringResumable
ConsumeStringResumable is identical to [ConsumeString] but supports resuming from a previous call that returned io.ErrUnexpectedEOF.
internal/jsonwire/decode.go:123
↓ 2 callers
Function
EscapeForJS
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 callers
Method
Export
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 callers
Method
Float64
Float64 returns the number as a float64.
v1/decode.go:200
↓ 2 callers
Function
FormatNilMapAsNull
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 callers
Function
FormatNilSliceAsNull
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 callers
Method
GetBufferedEncoder
(o ...Options)
jsontext/export.go:60
↓ 2 callers
Method
InitializeMultiline
InitializeMultiline sets default options implied by Multiline.
internal/jsonopts/options.go:184
↓ 2 callers
Method
InvalidateDisabledNamespaces
InvalidateDisabledNamespaces marks all disabled namespaces as invalid. For efficiency, Marshal and Unmarshal may disable namespaces since there are m
jsontext/state.go:421
↓ 2 callers
Function
MarshalFunc
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 callers
Method
MarshalText
()
v1/decode_test.go:151
↓ 2 callers
Function
NeedEscape
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 callers
Function
OmitZeroStructFields
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 callers
Method
PutBufferedEncoder
(e *Encoder)
jsontext/export.go:63
↓ 2 callers
Function
ReformatNumber
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 callers
Function
ReportErrorsWithLegacySemantics
ReportErrorsWithLegacySemantics specifies that Marshal and Unmarshal should report errors with legacy semantics: - When marshaling or unmarshaling, t
v1/alias.go:782
↓ 2 callers
Method
SkipUntil
SkipUntil skips all tokens until the state machine is at or past the specified depth and length.
jsontext/decode.go:456
↓ 2 callers
Method
StackDepth
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 callers
Method
StackIndex
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 callers
Function
TrimSuffixString
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 callers
Function
UnmarshalFromFunc
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 callers
Method
UnmarshalText
(b []byte)
v1/decode_test.go:157
↓ 2 callers
Method
Unwrap
Unwrap returns the underlying error.
v1/encode.go:261
↓ 2 callers
Method
UseNumber
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 callers
Function
appendEscapedASCII
(dst []byte, c byte)
internal/jsonwire/encode.go:112
↓ 2 callers
Function
appendEscapedUnicode
(dst []byte, r rune)
internal/jsonwire/encode.go:132
↓ 2 callers
Function
appendIndent
(dst, src []byte, prefix, indent string)
v1/indent.go:91
↓ 2 callers
Method
appendMarshal
(b []byte)
arshal_time.go:255
↓ 2 callers
Function
appendPaddedBase10
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 callers
Method
appendStackPointer
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 callers
Function
appendTimeUnix
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 callers
Function
bytesCutByte
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 callers
Function
castableTo
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 callers
Method
checkEOF
(pos int)
jsontext/decode.go:809
↓ 2 callers
Function
checkValid
(data []byte)
v1/scanner.go:27
↓ 2 callers
Method
clearLast
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 callers
Method
consumeNumber
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 callers
Method
ensureCopiedBuffer
()
jsontext/state.go:670
↓ 2 callers
Function
equalFold
(x, y []byte)
fold_test.go:69
↓ 2 callers
Function
f64toi64
(f64 float64)
jsontext/token.go:510
↓ 2 callers
Function
f64tou64
(f64 float64)
jsontext/token.go:589
↓ 2 callers
Method
float
(bits int)
jsontext/token.go:391
↓ 2 callers
Function
genString
(stddev float64)
v1/scanner_test.go:266
↓ 2 callers
Method
getUnquoted
getUnquoted retrieves the ith unquoted name in the namespace.
jsontext/state.go:746
↓ 2 callers
Method
insert
(name []byte, quoted bool)
jsontext/state.go:771
↓ 2 callers
Method
lookupByFoldedName
lookupByFoldedName looks up name by a case-insensitive match that also ignores the presence of dashes and underscores.
fields.go:63
↓ 2 callers
Function
makeBytesArshaler
(t reflect.Type, fncs *arshaler)
arshal_default.go:325
↓ 2 callers
Function
makeStructFields
(root reflect.Type)
fields.go:80
↓ 2 callers
Function
mapKeyWithUniqueRepresentation
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 callers
Method
matchFoldedName
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 callers
Function
mayAppendDurationSign
mayAppendDurationSign appends a negative sign if n is negative.
arshal_time.go:623
↓ 2 callers
Function
mayApplyDurationSign
mayApplyDurationSign inverts n if neg is specified.
arshal_time.go:632
↓ 2 callers
Method
mayError
mayError may return a non-nil error.
jsontext/coder_test.go:844
↓ 2 callers
Method
mayTruncate
mayTruncate may return a value between [0, n].
jsontext/coder_test.go:833
↓ 2 callers
Function
mustReorderObjects
mustReorderObjects reorders in-place all object members in a JSON value, which must be valid otherwise it panics.
jsontext/value.go:304
↓ 2 callers
Method
needImplicitColon
needImplicitColon reports whether a colon should occur next, which always occurs after JSON object names.
jsontext/state.go:480
↓ 2 callers
Method
needObjectValue
needObjectValue reports whether the next token must be a JSON value, which is necessary after every JSON object name.
jsontext/state.go:486
↓ 2 callers
Function
negateSecNano
negateSecNano negates a Unix timestamp, where nsec must be within [0, 1e9).
arshal_time.go:698
↓ 2 callers
Function
newTypedArshalers
(as ...*typedArshalers[Coder])
arshal_funcs.go:100
↓ 2 callers
Function
nlines
(s string, n int)
v1/stream_test.go:275
↓ 2 callers
Function
parseFieldOptions
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 callers
Function
parseFracBase10
parseFracBase10 parses the fraction of n/max10, where max10 is a power-of-10 that is larger than n.
arshal_time.go:717
↓ 2 callers
Function
parseTimeUnix
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 callers
Method
previousOffsetEnd
()
jsontext/encode.go:226
↓ 2 callers
Method
previousOffsetEnd
()
jsontext/decode.go:282
↓ 2 callers
Method
readFSE
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 callers
Method
refillIfNeeded
refillIfNeeded reads the next block if necessary.
internal/zstd/zstd.go:145
↓ 2 callers
Method
reindex
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 callers
Method
reset
reset clears stored data and configures window size.
internal/zstd/window.go:21
↓ 2 callers
Function
runAllSlowStreamingDecode
(tb testing.TB)
bench_test.go:560
↓ 2 callers
Function
runAllTestdata
(tb testing.TB)
bench_test.go:401
↓ 2 callers
Function
runMarshal
(tb testing.TB)
bench_test.go:357
↓ 2 callers
Function
runUnmarshal
(tb testing.TB)
bench_test.go:323
↓ 2 callers
Function
runValue
(tb testing.TB)
bench_test.go:591
↓ 2 callers
Method
set
(i uint)
arshal_default.go:2005
↓ 2 callers
Method
setBufferSize
setBufferSize sets the decompressed buffer size. When this is called the buffer is empty.
internal/zstd/zstd.go:463
↓ 2 callers
Function
sliceLen
(v reflect.Value)
arshal_default.go:78
← previous
next →
301–400 of 1,017, ranked by callers