MCPcopy Create free account
hub / github.com/go-json-experiment/json / AppendFloat

Function AppendFloat

internal/jsonwire/encode.go:213–236  ·  view source on GitHub ↗

AppendFloat appends src to dst as a JSON number per RFC 7159, section 6. It formats numbers similar to the ES6 number-to-string conversion. See https://go.dev/issue/14135. The output is identical to ECMA-262, 6th edition, section 7.1.12.1 and with RFC 8785, section 3.2.2.3 for 64-bit floating-point

(dst []byte, src float64, bits int)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 7

makeFloatArshalerFunction · 0.92
AppendFloatFunction · 0.92
stringMethod · 0.92
appendNumberMethod · 0.92
TestAppendNumberFunction · 0.70
TestCanonicalNumberFunction · 0.70
ReformatNumberFunction · 0.70

Calls

no outgoing calls

Tested by 2

TestAppendNumberFunction · 0.56
TestCanonicalNumberFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…