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
Method
MarshalJSON
()
v1/decode_test.go:300
Method
MarshalJSON
()
v1/decode_test.go:318
Method
MarshalJSON
()
v1/decode_test.go:356
Method
MarshalJSON
()
v1/decode_test.go:374
Method
MarshalJSON
()
v1/encode_test.go:456
Method
MarshalJSON
()
v1/encode_test.go:468
Method
MarshalJSON
()
v1/encode_test.go:524
Method
MarshalJSON
()
v1/encode_test.go:759
Method
MarshalJSON
()
v1/encode_test.go:1029
Method
MarshalJSON
()
v1/encode_test.go:1037
Method
MarshalJSON
()
v1/encode_test.go:1332
Method
MarshalJSON
()
v1/encode_test.go:1390
Method
MarshalJSON
MarshalJSON always returns a JSON string with the literal "CALLED".
v1/diff_test.go:571
Method
MarshalJSON
()
v1/example_marshaling_test.go:42
Method
MarshalJSON
()
v1/stream_test.go:142
Method
MarshalJSON
()
v1/stream_test.go:148
Method
MarshalJSON
MarshalJSON returns v as the JSON encoding of v. It returns the stored value as the raw JSON output without any validation. If v is nil, then this ret
jsontext/value.go:238
Method
MarshalJSONTo
(enc *jsontext.Encoder)
arshal_test.go:610
Method
MarshalJSONTo
(enc *jsontext.Encoder)
arshal_test.go:646
Method
MarshalJSONTo
(enc *jsontext.Encoder)
arshal_test.go:655
Method
MarshalJSONTo
(enc *jsontext.Encoder)
arshal_test.go:690
Method
MarshalJSONTo
MarshalJSONTo encodes obj as a JSON object into enc.
example_orderedobject_test.go:34
Method
MarshalJSONTo
(enc *jsontext.Encoder)
bench_test.go:309
Method
MarshalJSONTo
MarshalJSONTo implements [jsonv2.MarshalerTo].
v1/decode.go:212
Method
MarshalText
()
arshal_test.go:607
Method
MarshalText
()
arshal_test.go:622
Method
MarshalText
()
arshal_test.go:682
Method
MarshalText
()
arshal_test.go:699
Method
MarshalText
()
arshal_test.go:712
Method
MarshalText
()
bench_test.go:285
Method
MarshalText
needed for re-marshaling tests
v1/decode_test.go:129
Method
MarshalText
()
v1/decode_test.go:328
Method
MarshalText
()
v1/decode_test.go:346
Method
MarshalText
()
v1/decode_test.go:384
Method
MarshalText
()
v1/decode_test.go:402
Method
MarshalText
()
v1/encode_test.go:475
Method
MarshalText
()
v1/encode_test.go:487
Method
MarshalText
()
v1/encode_test.go:771
Method
MarshalText
()
v1/encode_test.go:1033
Method
MarshalText
()
v1/encode_test.go:1041
Method
MarshalText
()
v1/encode_test.go:1051
Method
MarshalText
()
v1/example_text_marshaling_test.go:37
Function
MarshalWrite
MarshalWrite serializes a Go value into an [io.Writer] according to the provided marshal and encode options (while ignoring unmarshal or decode option
arshal.go:181
Function
MatchCaseInsensitiveNames
MatchCaseInsensitiveNames specifies that JSON object members are matched against Go struct fields using a case-insensitive match of the name. If a nam
options.go:211
Function
MatchCaseSensitiveDelimiter
MatchCaseSensitiveDelimiter specifies that underscores and dashes are not to be ignored when performing case-insensitive name matching which occurs un
v1/alias.go:658
Function
MatchCaseSensitiveDelimiter
MatchCaseSensitiveDelimiter specifies that underscores and dashes are not to be ignored when performing case-insensitive name matching which occurs un
v1/options.go:341
Function
MergeWithLegacySemantics
MergeWithLegacySemantics specifies that unmarshaling into a non-zero Go value follows legacy semantics: - When unmarshaling a JSON null, this preserv
v1/alias.go:685
Function
MergeWithLegacySemantics
MergeWithLegacySemantics specifies that unmarshaling into a non-zero Go value follows legacy semantics: - When unmarshaling a JSON null, this preserv
v1/options.go:372
Function
Multiline
Multiline specifies that the JSON output should expand to multiple lines, where every JSON object member or JSON array element appears on a new, inden
jsontext/options.go:213
Function
NewDecoder
NewDecoder returns a new decoder that reads from r. The decoder introduces its own buffering and may read data from r beyond the JSON values requeste
v1/stream.go:38
Function
NewDecoder
NewDecoder constructs a new streaming decoder reading from r. If r is a [bytes.Buffer], then the decoder parses directly from the buffer without firs
jsontext/decode.go:122
Function
NewEncoder
NewEncoder returns a new encoder that writes to w.
v1/stream.go:124
Function
NewEncoder
NewEncoder constructs a new streaming encoder writing to w configured with the provided options. It flushes the internal buffer when the buffer is suf
jsontext/encode.go:91
Function
OmitEmptyWithLegacySemantics
OmitEmptyWithLegacySemantics specifies that the `omitempty` tag option follows a definition of empty where a field is omitted if the Go value is false
v1/alias.go:703
Function
OmitEmptyWithLegacySemantics
OmitEmptyWithLegacySemantics specifies that the `omitempty` tag option follows a definition of empty where a field is omitted if the Go value is false
v1/options.go:394
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
options.go:182
Method
Options
Options returns the options used to construct the encoder and may additionally contain semantic options passed to a [encoding/json/v2.MarshalEncode] c
jsontext/encode.go:140
Method
Options
Options returns the options used to construct the decoder and may additionally contain semantic options passed to a [encoding/json/v2.UnmarshalDecode]
jsontext/decode.go:165
Function
ParseBytesWithLooseRFC4648
ParseBytesWithLooseRFC4648 specifies that when parsing binary data encoded as "base32" or "base64", to ignore the presence of '\r' and '\n' characters
v1/alias.go:716
Function
ParseBytesWithLooseRFC4648
ParseBytesWithLooseRFC4648 specifies that when parsing binary data encoded as "base32" or "base64", to ignore the presence of '\r' and '\n' characters
v1/options.go:411
Function
ParseTimeWithLooseRFC3339
ParseTimeWithLooseRFC3339 specifies that a [time.Time] parses according to loose adherence to RFC 3339. In particular, it permits historically incorre
v1/alias.go:729
Function
ParseTimeWithLooseRFC3339
ParseTimeWithLooseRFC3339 specifies that a [time.Time] parses according to loose adherence to RFC 3339. In particular, it permits historically incorre
v1/options.go:428
Function
PreserveRawStrings
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/options.go:111
Method
ProtoReflect
()
example_test.go:370
Method
ReadByte
ReadByte implements [io.ByteReader].
internal/zstd/zstd.go:135
Function
RejectUnknownMembers
RejectUnknownMembers specifies that unknown members should be rejected when unmarshaling a JSON object. This only affects unmarshaling and is ignored
options.go:223
Function
ReorderRawObjects
ReorderRawObjects specifies that when encoding a raw JSON object in a [Value], the object members are reordered according to RFC 8785, section 3.2.3.
jsontext/options.go:166
Function
ReportErrorsWithLegacySemantics
ReportErrorsWithLegacySemantics specifies that Marshal and Unmarshal should report errors with legacy semantics: - When marshaling or unmarshaling, t
v1/options.go:485
Method
SkipValue
()
jsontext/decode.go:416
Function
SpaceAfterColon
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/options.go:179
Function
SpaceAfterComma
SpaceAfterComma specifies that the JSON output should emit a space character after each comma separator following a JSON object value or array element
jsontext/options.go:192
Method
String
()
arshal_test.go:735
Method
String
()
internal/jsontest/testcase.go:33
Function
StringifyNumbers
StringifyNumbers specifies that types that would normally be encoded as a JSON number to instead be encoded as a JSON string containing the equivalent
options.go:126
Function
StringifyWithLegacySemantics
StringifyWithLegacySemantics specifies that the `string` tag option may stringify bools and string values. It only takes effect on fields where the to
v1/alias.go:809
Function
StringifyWithLegacySemantics
StringifyWithLegacySemantics specifies that the `string` tag option may stringify bools and string values. It only takes effect on fields where the to
v1/options.go:516
Function
TestAnonymousFields
(t *testing.T)
v1/encode_test.go:557
Function
TestAppendNumber
(t *testing.T)
internal/jsonwire/encode_test.go:86
Function
TestAppendQuote
(t *testing.T)
internal/jsonwire/encode_test.go:28
Function
TestArrays
In v1, unmarshaling into a Go array permits JSON arrays with any length. In v2, unmarshaling into a Go array requires that the JSON array have the exa
v1/diff_test.go:493
Function
TestBenchmarkMarshal
(t *testing.T)
bench_test.go:354
Function
TestBenchmarkSlowStreamingDecode
(t *testing.T)
bench_test.go:557
Function
TestBenchmarkTestdata
(t *testing.T)
bench_test.go:398
Function
TestBenchmarkTextValue
(t *testing.T)
bench_test.go:588
Function
TestBenchmarkUnmarshal
(t *testing.T)
bench_test.go:320
Function
TestBenchmarkUnmarshalUnknown
TestBenchmarkUnmarshalUnknown unmarshals an unknown field into a struct with varying number of fields. Since the unknown field does not directly match
fold_test.go:106
Function
TestBlocking
(t *testing.T)
v1/stream_test.go:340
Function
TestBlockingDecoder
TestBlockingDecoder verifies that JSON values except numbers can be synchronously sent and received on a blocking pipe without a deadlock. Numbers are
jsontext/decode_test.go:1115
Function
TestBufferDecoder
TestBufferDecoder tests that we detect misuses of bytes.Buffer with Decoder.
jsontext/decode_test.go:1046
Function
TestByteArrays
In v1, byte arrays are treated as arrays of unsigned integers. In v2, byte arrays are treated as binary values (similar to []byte). This is to make th
v1/diff_test.go:531
Function
TestByteKind
Custom types with []byte as underlying type could not be marshaled and then unmarshaled. Issue 8962.
v1/decode_test.go:2328
Function
TestCanonicalNumber
TestCanonicalNumber verifies that appendNumber complies with RFC 8785 according to the testdata provided by the reference implementation. See https://
internal/jsonwire/encode_test.go:171
Function
TestCaseSensitivity
In v1, unmarshal matches struct fields using a case-insensitive match. In v2, unmarshal matches struct fields using a case-sensitive match. Case-inse
v1/diff_test.go:51
Function
TestCoderInterleaved
TestCoderInterleaved tests that we can interleave calls that operate on tokens and raw values. The only error condition is trying to operate on a raw
jsontext/coder_test.go:444
Function
TestCoderMaxDepth
(t *testing.T)
jsontext/coder_test.go:605
Function
TestCoderStackPointer
(t *testing.T)
jsontext/coder_test.go:515
Function
TestCompactAndIndent
(t *testing.T)
v1/scanner_test.go:53
Function
TestCompactBig
Tests of a large random structure.
v1/scanner_test.go:137
Function
TestCompactSeparators
(t *testing.T)
v1/scanner_test.go:113
Function
TestCompareUTF16
(t *testing.T)
internal/jsonwire/wire_test.go:38
← previous
next →
701–800 of 1,017, ranked by callers