MCPcopy
hub / github.com/pelletier/go-toml / SetMarshalJSONNumbers

Method SetMarshalJSONNumbers

marshaler.go:108–111  ·  view source on GitHub ↗

SetMarshalJSONNumbers forces the encoder to serialize `json.Number` as a float or integer instead of relying on TextMarshaler to emit a string. *Unstable:* This method does not follow the compatibility guarantees of semver. It can be changed or removed without a new major version being issued.

(indent bool)

Source from the content-addressed store, hash-verified

106// semver. It can be changed or removed without a new major version being
107// issued.
108func (enc *Encoder) SetMarshalJSONNumbers(indent bool) *Encoder {
109 enc.marshalJSONNumbers = indent
110 return enc
111}
112
113// Encode writes a TOML representation of v to the stream.
114//

Callers 3

convertFunction · 0.95
TestMarshalJSONNumbersFunction · 0.80

Calls

no outgoing calls

Tested by 2

TestMarshalJSONNumbersFunction · 0.64